Skip to content

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeAdachi committed Feb 23, 2022
1 parent 1f216d5 commit ccfd62e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/feast_whylogs_example/feature_repo/example.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# This is an example feature definition file

from google.protobuf.duration_pb2 import Duration

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
# 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",
Expand All @@ -15,7 +14,11 @@

# 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",)
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
Expand All @@ -28,7 +31,6 @@
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,
Expand Down

0 comments on commit ccfd62e

Please sign in to comment.