Skip to content

Commit

Permalink
Merge ccfd62e into 65e3f13
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeAdachi committed Feb 23, 2022
2 parents 65e3f13 + ccfd62e commit e9b7d64
Show file tree
Hide file tree
Showing 9 changed files with 6,853 additions and 0 deletions.
6,810 changes: 6,810 additions & 0 deletions examples/feast_whylogs_example/feast_whylogs.ipynb

Large diffs are not rendered by default.

Empty file.
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions examples/feast_whylogs_example/feature_repo/example.py
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={},
)
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
Binary file added examples/feast_whylogs_example/images/context.jpg
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.

0 comments on commit e9b7d64

Please sign in to comment.