-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
6,853 additions
and
0 deletions.
There are no files selected for viewing
6,810 changes: 6,810 additions & 0 deletions
6,810
examples/feast_whylogs_example/feast_whylogs.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Binary file added
BIN
+12.4 KB
examples/feast_whylogs_example/feature_repo/data/driver_stats.parquet
Binary file not shown.
Binary file added
BIN
+19.9 KB
examples/feast_whylogs_example/feature_repo/data/nyc_taxi_rides_feb_2020.parquet
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This is an example feature definition file | ||
|
||
from feast import Entity, Feature, FeatureView, FileSource, ValueType | ||
from google.protobuf.duration_pb2 import Duration | ||
|
||
# Read data from parquet files. Parquet is convenient for local development mode. For | ||
# production you can use your favorite DWH, such as BigQuery. See Feast documentation | ||
# for more info. | ||
driver_hourly_stats = FileSource( | ||
path="/work/feature_repo/data/driver_stats.parquet", | ||
event_timestamp_column="event_timestamp", | ||
created_timestamp_column="created", | ||
) | ||
|
||
# Define an entity for the driver. You can think of entity as a primary key used to | ||
# fetch features. | ||
driver = Entity( | ||
name="driver_id", | ||
value_type=ValueType.INT64, | ||
description="driver id", | ||
) | ||
|
||
# Our parquet files contain sample data that includes a driver_id column, timestamps and | ||
# three feature column. Here we define a Feature View that will allow us to serve this | ||
# data to our model online. | ||
driver_hourly_stats_view = FeatureView( | ||
name="driver_hourly_stats", | ||
entities=["driver_id"], | ||
ttl=Duration(seconds=86400 * 1), | ||
features=[ | ||
Feature(name="rate_1m", dtype=ValueType.INT64), | ||
Feature(name="avg_daily_trips", dtype=ValueType.INT64), | ||
Feature(name="avg_speed", dtype=ValueType.FLOAT), | ||
], | ||
online=True, | ||
batch_source=driver_hourly_stats, | ||
tags={}, | ||
) |
5 changes: 5 additions & 0 deletions
5
examples/feast_whylogs_example/feature_repo/feature_store.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project: feature_repo | ||
registry: data/registry.db | ||
provider: local | ||
online_store: | ||
path: data/online_store.db |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.