From fc0d16034a3e6c3ef5e8e44df2869e183fa65670 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 15:19:52 -0700 Subject: [PATCH 01/12] Update file Signed-off-by: Kevin Zhang --- docs/reference/data-sources/file.md | 2 +- protos/feast/core/DataSource.proto | 8 +++ sdk/python/feast/infra/offline_stores/file.py | 4 +- .../feast/infra/offline_stores/file_source.py | 63 +++++++++++++------ 4 files changed, 56 insertions(+), 21 deletions(-) diff --git a/docs/reference/data-sources/file.md b/docs/reference/data-sources/file.md index 80e262aa9f8..12e6529840d 100644 --- a/docs/reference/data-sources/file.md +++ b/docs/reference/data-sources/file.md @@ -16,7 +16,7 @@ from feast.data_format import ParquetFormat parquet_file_source = FileSource( file_format=ParquetFormat(), - file_url="file:///feast/customer.parquet", + path="file:///feast/customer.parquet", ) ``` diff --git a/protos/feast/core/DataSource.proto b/protos/feast/core/DataSource.proto index f9a68cf098b..db74e6c4e12 100644 --- a/protos/feast/core/DataSource.proto +++ b/protos/feast/core/DataSource.proto @@ -89,10 +89,18 @@ message DataSource { // s3://path/to/file for AWS S3 storage // gs://path/to/file for GCP GCS storage // file:///path/to/file for local storage + // Deprecated in Feast 0.23.0 string file_url = 2; // override AWS S3 storage endpoint with custom S3 endpoint string s3_endpoint_override = 3; + + // Target URL of file to retrieve and source features from. + // s3://path/to/file for AWS S3 storage + // gs://path/to/file for GCP GCS storage + // file:///path/to/file for local storage + // Deprecated in Feast 0.23.0 + string uri = 4; } // Defines options for DataSource that sources features from a BigQuery Query diff --git a/sdk/python/feast/infra/offline_stores/file.py b/sdk/python/feast/infra/offline_stores/file.py index b39e8f5c2de..fe2a1209cf3 100644 --- a/sdk/python/feast/infra/offline_stores/file.py +++ b/sdk/python/feast/infra/offline_stores/file.py @@ -77,9 +77,9 @@ def _to_arrow_internal(self): def persist(self, storage: SavedDatasetStorage): assert isinstance(storage, SavedDatasetFileStorage) - + uri = storage.file_options.uri if storage.file_options.uri else storage.file_options.file_url filesystem, path = FileSource.create_filesystem_and_path( - storage.file_options.file_url, storage.file_options.s3_endpoint_override, + uri, storage.file_options.s3_endpoint_override, ) if path.endswith(".parquet"): diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index d2e91596d37..b4a5293b3b7 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -1,4 +1,5 @@ from typing import Callable, Dict, Iterable, Optional, Tuple +import warnings from pyarrow._fs import FileSystem from pyarrow._s3fs import S3FileSystem @@ -60,8 +61,9 @@ def __init__( ) self.file_options = FileOptions( file_format=file_format, - file_url=path, + uri=path, s3_endpoint_override=s3_endpoint_override, + uri=path, ) super().__init__( @@ -85,7 +87,7 @@ def __eq__(self, other): return ( self.name == other.name - and self.file_options.file_url == other.file_options.file_url + and self.file_options.uri == other.file_options.uri and self.file_options.file_format == other.file_options.file_format and self.event_timestamp_column == other.event_timestamp_column and self.created_timestamp_column == other.created_timestamp_column @@ -102,7 +104,7 @@ def path(self): """ Returns the path of this file data source. """ - return self.file_options.file_url + return self.file_options.uri @staticmethod def from_proto(data_source: DataSourceProto): @@ -110,7 +112,7 @@ def from_proto(data_source: DataSourceProto): name=data_source.name, field_mapping=dict(data_source.field_mapping), file_format=FileFormat.from_proto(data_source.file_options.file_format), - path=data_source.file_options.file_url, + path=data_source.file_options.uri, event_timestamp_column=data_source.event_timestamp_column, created_timestamp_column=data_source.created_timestamp_column, date_partition_column=data_source.date_partition_column, @@ -180,19 +182,20 @@ class FileOptions: def __init__( self, file_format: Optional[FileFormat], - file_url: Optional[str], s3_endpoint_override: Optional[str], + uri: Optional[str], ): """ FileOptions initialization method Args: file_format (FileFormat, optional): file source format eg. parquet - file_url (str, optional): file source url eg. s3:// or local file - s3_endpoint_override (str, optional): custom s3 endpoint (used only with s3 file_url) + s3_endpoint_override (str, optional): custom s3 endpoint (used only with s3 uri) + uri (str, optional): file source url eg. s3:// or local file + """ self._file_format = file_format - self._file_url = file_url + self._uri = uri self._s3_endpoint_override = s3_endpoint_override @property @@ -210,18 +213,18 @@ def file_format(self, file_format): self._file_format = file_format @property - def file_url(self): + def uri(self): """ Returns the file url of this file """ - return self._file_url + return self.uri - @file_url.setter - def file_url(self, file_url): + @uri.setter + def uri(self, uri): """ Sets the file url of this file """ - self._file_url = file_url + self._uri = uri @property def s3_endpoint_override(self): @@ -250,7 +253,7 @@ def from_proto(cls, file_options_proto: DataSourceProto.FileOptions): """ file_options = cls( file_format=FileFormat.from_proto(file_options_proto.file_format), - file_url=file_options_proto.file_url, + uri=file_options_proto.uri, s3_endpoint_override=file_options_proto.s3_endpoint_override, ) return file_options @@ -267,8 +270,9 @@ def to_proto(self) -> DataSourceProto.FileOptions: file_format=( None if self.file_format is None else self.file_format.to_proto() ), - file_url=self.file_url, + uri=self.uri, s3_endpoint_override=self.s3_endpoint_override, + uri=self.uri, ) return file_options_proto @@ -286,16 +290,27 @@ def __init__( s3_endpoint_override: Optional[str] = None, ): self.file_options = FileOptions( - file_url=path, file_format=file_format, s3_endpoint_override=s3_endpoint_override, + uri=path, ) @staticmethod def from_proto(storage_proto: SavedDatasetStorageProto) -> SavedDatasetStorage: file_options = FileOptions.from_proto(storage_proto.file_storage) + if file_options.uri: + path = file_options.uri + else: + path = file_options.file_url + if path: + warnings.warn( + ( + "FileSource Proto is replacing the file_url field in FileOptions with uri soon." + "Feast 0.23+ will no longer support file_url. Please change to using uri in your protos." + ) + ) return SavedDatasetFileStorage( - path=file_options.file_url, + path=path, file_format=file_options.file_format, s3_endpoint_override=file_options.s3_endpoint_override, ) @@ -304,8 +319,20 @@ def to_proto(self) -> SavedDatasetStorageProto: return SavedDatasetStorageProto(file_storage=self.file_options.to_proto()) def to_data_source(self) -> DataSource: + if self.file_options.uri: + path = self.file_options.uri + else: + path = self.file_options.file_url + if path: + warnings.warn( + ( + "FileSource Proto is replacing the file_url field in FileOptions with uri soon." + "Feast 0.23+ will no longer support file_url. Please change to using uri in your protos." + ), + DeprecationWarning, + ) return FileSource( - path=self.file_options.file_url, + path=path, file_format=self.file_options.file_format, s3_endpoint_override=self.file_options.s3_endpoint_override, ) From d79d9d8b5dd68c4f6a8cecabb70666215dcf27c0 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 15:22:26 -0700 Subject: [PATCH 02/12] Fix Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file.py | 6 +++++- sdk/python/feast/infra/offline_stores/file_source.py | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/file.py b/sdk/python/feast/infra/offline_stores/file.py index fe2a1209cf3..1fba7f88b57 100644 --- a/sdk/python/feast/infra/offline_stores/file.py +++ b/sdk/python/feast/infra/offline_stores/file.py @@ -77,7 +77,11 @@ def _to_arrow_internal(self): def persist(self, storage: SavedDatasetStorage): assert isinstance(storage, SavedDatasetFileStorage) - uri = storage.file_options.uri if storage.file_options.uri else storage.file_options.file_url + uri = ( + storage.file_options.uri + if storage.file_options.uri + else storage.file_options.file_url + ) filesystem, path = FileSource.create_filesystem_and_path( uri, storage.file_options.s3_endpoint_override, ) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index b4a5293b3b7..bd458edded5 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -63,7 +63,6 @@ def __init__( file_format=file_format, uri=path, s3_endpoint_override=s3_endpoint_override, - uri=path, ) super().__init__( @@ -307,7 +306,7 @@ def from_proto(storage_proto: SavedDatasetStorageProto) -> SavedDatasetStorage: ( "FileSource Proto is replacing the file_url field in FileOptions with uri soon." "Feast 0.23+ will no longer support file_url. Please change to using uri in your protos." - ) + ), ) return SavedDatasetFileStorage( path=path, From 13adf243a2f89292b4f39df0687c5f0d925d941b Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 15:24:21 -0700 Subject: [PATCH 03/12] Fix Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file.py | 7 +------ .../feast/infra/offline_stores/file_source.py | 16 +--------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/file.py b/sdk/python/feast/infra/offline_stores/file.py index 1fba7f88b57..383adaaf5d8 100644 --- a/sdk/python/feast/infra/offline_stores/file.py +++ b/sdk/python/feast/infra/offline_stores/file.py @@ -77,13 +77,8 @@ def _to_arrow_internal(self): def persist(self, storage: SavedDatasetStorage): assert isinstance(storage, SavedDatasetFileStorage) - uri = ( - storage.file_options.uri - if storage.file_options.uri - else storage.file_options.file_url - ) filesystem, path = FileSource.create_filesystem_and_path( - uri, storage.file_options.s3_endpoint_override, + storage.file_options.uri, storage.file_options.s3_endpoint_override, ) if path.endswith(".parquet"): diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index bd458edded5..13486a60345 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -86,7 +86,6 @@ def __eq__(self, other): return ( self.name == other.name - and self.file_options.uri == other.file_options.uri and self.file_options.file_format == other.file_options.file_format and self.event_timestamp_column == other.event_timestamp_column and self.created_timestamp_column == other.created_timestamp_column @@ -271,7 +270,6 @@ def to_proto(self) -> DataSourceProto.FileOptions: ), uri=self.uri, s3_endpoint_override=self.s3_endpoint_override, - uri=self.uri, ) return file_options_proto @@ -318,20 +316,8 @@ def to_proto(self) -> SavedDatasetStorageProto: return SavedDatasetStorageProto(file_storage=self.file_options.to_proto()) def to_data_source(self) -> DataSource: - if self.file_options.uri: - path = self.file_options.uri - else: - path = self.file_options.file_url - if path: - warnings.warn( - ( - "FileSource Proto is replacing the file_url field in FileOptions with uri soon." - "Feast 0.23+ will no longer support file_url. Please change to using uri in your protos." - ), - DeprecationWarning, - ) return FileSource( - path=path, + path=self.file_options.uri, file_format=self.file_options.file_format, s3_endpoint_override=self.file_options.s3_endpoint_override, ) From 9d5fe71e9653c3f97791d62f20f414d652e1139a Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 15:25:05 -0700 Subject: [PATCH 04/12] Lint Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 13486a60345..93ce27afadf 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -1,5 +1,5 @@ -from typing import Callable, Dict, Iterable, Optional, Tuple import warnings +from typing import Callable, Dict, Iterable, Optional, Tuple from pyarrow._fs import FileSystem from pyarrow._s3fs import S3FileSystem From 3c9183080f365c26fd622a71d60311e93d02a9ef Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 15:59:25 -0700 Subject: [PATCH 05/12] Update the schema Signed-off-by: Kevin Zhang --- .../test/java/feast/serving/util/DataGenerator.java | 4 ++-- protos/feast/core/DataSource.proto | 10 +--------- .../feast/infra/offline_stores/file_source.py | 13 +------------ 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/java/serving/src/test/java/feast/serving/util/DataGenerator.java b/java/serving/src/test/java/feast/serving/util/DataGenerator.java index c6c11a9bf78..7d3025429ea 100644 --- a/java/serving/src/test/java/feast/serving/util/DataGenerator.java +++ b/java/serving/src/test/java/feast/serving/util/DataGenerator.java @@ -166,7 +166,7 @@ public static FeatureTableSpec createFeatureTableSpec( FileFormat.newBuilder() .setParquetFormat(ParquetFormat.newBuilder().build()) .build()) - .setFileUrl("/dev/null") + .setUri("/dev/null") .build()) .build()) .putAllLabels(labels) @@ -205,7 +205,7 @@ public static DataSource createFileDataSourceSpec( .setFileOptions( FileOptions.newBuilder() .setFileFormat(createParquetFormat()) - .setFileUrl(fileURL) + .setUri(fileURL) .build()) .setEventTimestampColumn(timestampColumn) .setDatePartitionColumn(datePartitionColumn) diff --git a/protos/feast/core/DataSource.proto b/protos/feast/core/DataSource.proto index db74e6c4e12..8fe84274a1f 100644 --- a/protos/feast/core/DataSource.proto +++ b/protos/feast/core/DataSource.proto @@ -89,18 +89,10 @@ message DataSource { // s3://path/to/file for AWS S3 storage // gs://path/to/file for GCP GCS storage // file:///path/to/file for local storage - // Deprecated in Feast 0.23.0 - string file_url = 2; + string uri = 2; // override AWS S3 storage endpoint with custom S3 endpoint string s3_endpoint_override = 3; - - // Target URL of file to retrieve and source features from. - // s3://path/to/file for AWS S3 storage - // gs://path/to/file for GCP GCS storage - // file:///path/to/file for local storage - // Deprecated in Feast 0.23.0 - string uri = 4; } // Defines options for DataSource that sources features from a BigQuery Query diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 93ce27afadf..25d2644ba57 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -295,19 +295,8 @@ def __init__( @staticmethod def from_proto(storage_proto: SavedDatasetStorageProto) -> SavedDatasetStorage: file_options = FileOptions.from_proto(storage_proto.file_storage) - if file_options.uri: - path = file_options.uri - else: - path = file_options.file_url - if path: - warnings.warn( - ( - "FileSource Proto is replacing the file_url field in FileOptions with uri soon." - "Feast 0.23+ will no longer support file_url. Please change to using uri in your protos." - ), - ) return SavedDatasetFileStorage( - path=path, + path=file_options.uri, file_format=file_options.file_format, s3_endpoint_override=file_options.s3_endpoint_override, ) From aad33226efb260be54353b70f0de570739c4fade Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 16:01:05 -0700 Subject: [PATCH 06/12] Fix lint Signed-off-by: Kevin Zhang --- .../src/test/java/feast/serving/util/DataGenerator.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/java/serving/src/test/java/feast/serving/util/DataGenerator.java b/java/serving/src/test/java/feast/serving/util/DataGenerator.java index 7d3025429ea..edbb99b339e 100644 --- a/java/serving/src/test/java/feast/serving/util/DataGenerator.java +++ b/java/serving/src/test/java/feast/serving/util/DataGenerator.java @@ -203,10 +203,7 @@ public static DataSource createFileDataSourceSpec( return DataSource.newBuilder() .setType(DataSource.SourceType.BATCH_FILE) .setFileOptions( - FileOptions.newBuilder() - .setFileFormat(createParquetFormat()) - .setUri(fileURL) - .build()) + FileOptions.newBuilder().setFileFormat(createParquetFormat()).setUri(fileURL).build()) .setEventTimestampColumn(timestampColumn) .setDatePartitionColumn(datePartitionColumn) .build(); From c59a7d666bacce29c6f6e45f8aeb62903621be6d Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 30 Mar 2022 16:02:04 -0700 Subject: [PATCH 07/12] Fix lint Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file_source.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 25d2644ba57..9e255556068 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -1,4 +1,3 @@ -import warnings from typing import Callable, Dict, Iterable, Optional, Tuple from pyarrow._fs import FileSystem From 3727bd2a3616e6ad58367ccbf29cd32c7ba65ac1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 31 Mar 2022 10:23:34 -0700 Subject: [PATCH 08/12] Fix unit tests Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 9e255556068..e763fa614c9 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -214,7 +214,7 @@ def uri(self): """ Returns the file url of this file """ - return self.uri + return self._uri @uri.setter def uri(self, uri): From 4f6ffefef85d84cbccdc502ee2da588437ccccc8 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 31 Mar 2022 11:18:13 -0700 Subject: [PATCH 09/12] Keep file_url param Signed-off-by: Kevin Zhang --- .../feast/infra/offline_stores/file_source.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index e763fa614c9..70befd56ae6 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -1,3 +1,4 @@ +import warnings from typing import Callable, Dict, Iterable, Optional, Tuple from pyarrow._fs import FileSystem @@ -60,6 +61,7 @@ def __init__( ) self.file_options = FileOptions( file_format=file_format, + file_url=path, uri=path, s3_endpoint_override=s3_endpoint_override, ) @@ -179,6 +181,7 @@ class FileOptions: def __init__( self, file_format: Optional[FileFormat], + file_url: Optional[str], s3_endpoint_override: Optional[str], uri: Optional[str], ): @@ -187,11 +190,21 @@ def __init__( Args: file_format (FileFormat, optional): file source format eg. parquet + file_url (str, optional): [DEPRECATED] file source url eg. s3:// or local file s3_endpoint_override (str, optional): custom s3 endpoint (used only with s3 uri) uri (str, optional): file source url eg. s3:// or local file """ self._file_format = file_format + if file_url: + warnings.warn( + ( + "The option to pass a file_url parameter to FileOptions is being deprecated. " + "Please pass the file url to the uri parameter instead. The parameter will be deprecated in Feast 0.23" + ), + DeprecationWarning, + ) + self._file_url = file_url self._uri = uri self._s3_endpoint_override = s3_endpoint_override @@ -209,6 +222,20 @@ def file_format(self, file_format): """ self._file_format = file_format + @property + def file_url(self): + """ + Returns the file url of this file + """ + return self._file_url + + @file_url.setter + def file_url(self, file_url): + """ + Sets the file url of this file + """ + self._file_url = file_url + @property def uri(self): """ From 291463abb2c77867b14922bd26f1505508c49aca Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 31 Mar 2022 11:21:09 -0700 Subject: [PATCH 10/12] Fix Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file_source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 70befd56ae6..63eb94e8609 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -206,6 +206,8 @@ def __init__( ) self._file_url = file_url self._uri = uri + if not self._uri: + self._uri = self._file_url self._s3_endpoint_override = s3_endpoint_override @property @@ -289,7 +291,6 @@ def to_proto(self) -> DataSourceProto.FileOptions: Returns: FileOptionsProto protobuf """ - file_options_proto = DataSourceProto.FileOptions( file_format=( None if self.file_format is None else self.file_format.to_proto() From 64c740b4930ba51d81dc2143322aedcaa27a0c81 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 31 Mar 2022 11:24:09 -0700 Subject: [PATCH 11/12] Fix lint Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file_source.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 63eb94e8609..0990798a756 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -279,6 +279,7 @@ def from_proto(cls, file_options_proto: DataSourceProto.FileOptions): """ file_options = cls( file_format=FileFormat.from_proto(file_options_proto.file_format), + file_url="", uri=file_options_proto.uri, s3_endpoint_override=file_options_proto.s3_endpoint_override, ) @@ -315,6 +316,7 @@ def __init__( ): self.file_options = FileOptions( file_format=file_format, + file_url="", s3_endpoint_override=s3_endpoint_override, uri=path, ) From bab7542f0fe9521be4bba9d362a2b8ad42a7665f Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 31 Mar 2022 11:29:57 -0700 Subject: [PATCH 12/12] Fix Signed-off-by: Kevin Zhang --- sdk/python/feast/infra/offline_stores/file_source.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 0990798a756..ebeb0e28fdf 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -204,10 +204,7 @@ def __init__( ), DeprecationWarning, ) - self._file_url = file_url - self._uri = uri - if not self._uri: - self._uri = self._file_url + self._uri = uri or file_url self._s3_endpoint_override = s3_endpoint_override @property