@@ -103,14 +103,17 @@ def created(self):
103
103
"""Timestamp when the project was created"""
104
104
return self ._created
105
105
106
- def get_feature_store (self , name : str = None ) -> feature_store .FeatureStore :
106
+ def get_feature_store (self , name : str = None , engine : str = None ) -> feature_store .FeatureStore :
107
107
"""Connect to Project's Feature Store.
108
108
109
109
Defaulting to the project name of default feature store. To get a
110
110
shared feature store, the project name of the feature store is required.
111
111
112
112
# Arguments
113
113
name: Project name of the feature store.
114
+ engine: Which engine to use, `"spark"`, `"python"` or `"training"`.
115
+ Defaults to `"python"` when connected to https://c.app.hopsworks.ai/
116
+ See hsfs.Connection.connection documentation for more information.
114
117
# Returns
115
118
`hsfs.feature_store.FeatureStore`: The Feature Store API
116
119
# Raises
@@ -120,8 +123,7 @@ def get_feature_store(self, name: str = None) -> feature_store.FeatureStore:
120
123
121
124
_client = client .get_instance ()
122
125
if type (_client ) == Client : # If external client
123
- engine = None
124
- if _client ._host == constants .HOSTS .APP_HOST :
126
+ if _client ._host == constants .HOSTS .APP_HOST and engine is None :
125
127
engine = "python"
126
128
return connection (
127
129
host = _client ._host ,
@@ -131,7 +133,7 @@ def get_feature_store(self, name: str = None) -> feature_store.FeatureStore:
131
133
engine = engine ,
132
134
).get_feature_store (name )
133
135
else :
134
- return connection ().get_feature_store (name ) # If internal client
136
+ return connection ().get_feature_store (name , engine = engine ) # If internal client
135
137
136
138
def get_model_registry (self ):
137
139
"""Connect to Project's Model Registry API.
0 commit comments