GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Entity-less `get_historical_features` defaults `end_date` to the host's local time, read as UTC · Issue #7036 · feast-dev/feast Closed DescriptionExpected BehaviorWith Current BehaviorThe default end bound is the host's naive local wall-clock time. Offline stores read naive datetimes as UTC, so the window shifts by the host's UTC offset: west of UTC the newest rows are missing, east of UTC rows stamped in the future are returned. Dask offline store, one feature view with TTL 1 day. Source rows: driver 1 at now−5h (
Passing Steps to reproduce
project: end_date_default registry: data/registry.db provider: local online_store: type: sqlite path: data/online.db offline_store: type: dask entity_key_serialization_version: 3
from datetime import timedelta from feast import Entity, FeatureView, Field, FileSource from feast.types import Int64, String driver = Entity(name="driver", join_keys=["driver_id"]) source = FileSource(path="data/driver_stats.parquet", timestamp_field="event_timestamp") driver_stats = FeatureView( name="driver_stats", entities=[driver], ttl=timedelta(days=1), schema=[Field(name="driver_id", dtype=Int64), Field(name="label", dtype=String)], source=source, )
import sys from datetime import datetime, timedelta, timezone import pandas as pd from feast import FeatureStore sys.path.insert(0, "feature_repo") from features import driver, driver_stats now = datetime.now(timezone.utc).replace(microsecond=0) pd.DataFrame({ "driver_id": [1, 1, 2, 2], "label": ["d1_old", "d1_recent", "d2_old", "d2_future"], "event_timestamp": [now - timedelta(hours=5), now - timedelta(hours=1), now - timedelta(hours=5), now + timedelta(hours=1)], }).to_parquet("feature_repo/data/driver_stats.parquet") store = FeatureStore(repo_path="feature_repo") store.apply([driver, driver_stats]) for label, kwargs in [("explicit utc now", {"end_date": now}), ("end_date omitted", {})]: df = store.get_historical_features(entity_df=None, features=["driver_stats:label"], **kwargs).to_df() print(label, sorted(zip(df["driver_id"], df["label"]))) mkdir -p feature_repo/data TZ=UTC python probe.py TZ=America/Sao_Paulo python probe.py TZ=Asia/Tokyo python probe.py Specifications
Possible Solution
ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||
| 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. |