Skip to content

Commit 1ba94f7

Browse files
authored
fix: FeastExtrasDependencyImportError when using SparkOfflineStore without S3 (feast-dev#4594)
* Import aws_utils only if using s3. Signed-off-by: Aloysius Lim <aloysius.lim@cuezen.com> * Lint. Signed-off-by: Aloysius Lim <aloysius.lim@cuezen.com> --------- Signed-off-by: Aloysius Lim <aloysius.lim@cuezen.com>
1 parent 30603a2 commit 1ba94f7

File tree

1 file changed

+2
-1
lines changed
  • sdk/python/feast/infra/offline_stores/contrib/spark_offline_store

1 file changed

+2
-1
lines changed

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
RetrievalMetadata,
3131
)
3232
from feast.infra.registry.base_registry import BaseRegistry
33-
from feast.infra.utils import aws_utils
3433
from feast.repo_config import FeastConfigBaseModel, RepoConfig
3534
from feast.saved_dataset import SavedDatasetStorage
3635
from feast.type_map import spark_schema_to_np_dtypes
@@ -399,6 +398,8 @@ def to_remote_storage(self) -> List[str]:
399398

400399
return _list_files_in_folder(output_uri)
401400
elif self._config.offline_store.staging_location.startswith("s3://"):
401+
from feast.infra.utils import aws_utils
402+
402403
spark_compatible_s3_staging_location = (
403404
self._config.offline_store.staging_location.replace(
404405
"s3://", "s3a://"

0 commit comments

Comments
 (0)