GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Date wise remote offline store historical data retrieval (#5686) · Marcus-Rosti/feast@949ba3d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • sdk/python/feast
    • infra/offline_stores
      • remote.py
    • offline_server.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎sdk/python/feast/infra/offline_stores/remote.py‎

Copy file name to clipboardExpand all lines: sdk/python/feast/infra/offline_stores/remote.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def get_historical_features(
197197
registry: BaseRegistry,
198198
project: str,
199199
full_feature_names: bool = False,
200+
**kwargs,
200201
) -> RemoteRetrievalJob:
201202
assert isinstance(config.offline_store, RemoteOfflineStoreConfig)
202203

@@ -219,6 +220,15 @@ def get_historical_features(
219220
"name_aliases": name_aliases,
220221
}
221222

223+
# Extract and serialize start_date/end_date for remote transmission
224+
start_date = kwargs.get("start_date", None)
225+
end_date = kwargs.get("end_date", None)
226+
227+
if start_date is not None:
228+
api_parameters["start_date"] = start_date.isoformat()
229+
if end_date is not None:
230+
api_parameters["end_date"] = end_date.isoformat()
231+
222232
return RemoteRetrievalJob(
223233
client=client,
224234
api=OfflineStore.get_historical_features.__name__,
Collapse file

‎sdk/python/feast/offline_server.py‎

Copy file name to clipboardExpand all lines: sdk/python/feast/offline_server.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,17 @@ def get_historical_features(self, command: dict, key: Optional[str] = None):
449449
resource=feature_view, actions=[AuthzedAction.READ_OFFLINE]
450450
)
451451

452+
# Extract and deserialize start_date/end_date if present
453+
kwargs = {}
454+
if "start_date" in command and command["start_date"] is not None:
455+
kwargs["start_date"] = utils.make_tzaware(
456+
datetime.fromisoformat(command["start_date"])
457+
)
458+
if "end_date" in command and command["end_date"] is not None:
459+
kwargs["end_date"] = utils.make_tzaware(
460+
datetime.fromisoformat(command["end_date"])
461+
)
462+
452463
retJob = self.offline_store.get_historical_features(
453464
config=self.store.config,
454465
feature_views=feature_views,
@@ -457,6 +468,7 @@ def get_historical_features(self, command: dict, key: Optional[str] = None):
457468
registry=self.store.registry,
458469
project=project,
459470
full_feature_names=full_feature_names,
471+
**kwargs,
460472
)
461473

462474
return retJob

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.