Skip to content

Commit 2561cfc

Browse files
predictorsSHntkathole
authored andcommitted
fix(dask): preserve remote URIs (e.g. s3://) in DaskOfflineStore path resolution
Signed-off-by: sanghyun <[email protected]>
1 parent 833696c commit 2561cfc

File tree

1 file changed

+8
-8
lines changed
  • sdk/python/feast/infra/offline_stores

1 file changed

+8
-8
lines changed

sdk/python/feast/infra/offline_stores/dask.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,9 @@ def offline_write_batch(
521521

522522
file_options = feature_view.batch_source.file_options
523523

524-
if config.repo_path is not None and not Path(file_options.uri).is_absolute():
525-
absolute_path = config.repo_path / file_options.uri
526-
else:
527-
absolute_path = Path(file_options.uri)
524+
absolute_path = FileSource.get_uri_for_file_path(
525+
repo_path=config.repo_path, uri=file_options.uri
526+
)
528527

529528
filesystem, path = FileSource.create_filesystem_and_path(
530529
str(absolute_path), file_options.s3_endpoint_override
@@ -574,10 +573,11 @@ def _read_datasource(data_source, repo_path) -> dd.DataFrame:
574573
else None
575574
)
576575

577-
if not Path(data_source.path).is_absolute():
578-
path = repo_path / data_source.path
579-
else:
580-
path = data_source.path
576+
path = FileSource.get_uri_for_file_path(
577+
repo_path=repo_path,
578+
uri=data_source.file_options.uri,
579+
)
580+
581581
return dd.read_parquet(
582582
path,
583583
storage_options=storage_options,

0 commit comments

Comments
 (0)