MCPcopy Index your code
hub / github.com/feast-dev/feast / _call_api

Method _call_api

sdk/python/feast/offline_server.py:150–175  ·  view source on GitHub ↗
(self, api: str, command: dict, key: str)

Source from the content-addressed store, hash-verified

148 logger.warning(f"No 'api' field in command: {command}")
149
150 def _call_api(self, api: str, command: dict, key: str):
151 assert api is not None, "api can not be empty"
152
153 remove_data = False
154 try:
155 if api == OfflineServer.offline_write_batch.__name__:
156 self.offline_write_batch(command, key)
157 remove_data = True
158 elif api == OfflineServer.write_logged_features.__name__:
159 self.write_logged_features(command, key)
160 remove_data = True
161 elif api == OfflineServer.persist.__name__:
162 self.persist(command, key)
163 remove_data = True
164 elif api == OfflineServer.validate_data_source.__name__:
165 self.validate_data_source(command)
166 remove_data = True
167 except Exception as e:
168 remove_data = True
169 logger.exception(e)
170 traceback.print_exc()
171 raise e
172 finally:
173 if remove_data:
174 # Get service is consumed, so we clear the corresponding flight and data
175 del self.flights[key]
176
177 def get_feature_view_by_name(
178 self, fv_name: str, name_alias: str, project: str

Callers 1

do_putMethod · 0.95

Calls 5

offline_write_batchMethod · 0.95
write_logged_featuresMethod · 0.95
persistMethod · 0.95
validate_data_sourceMethod · 0.95
exceptionMethod · 0.80

Tested by

no test coverage detected