From 2267064915bf19c6469193f8351e54e7aa9600d8 Mon Sep 17 00:00:00 2001 From: Felix Wang Date: Mon, 11 Apr 2022 16:58:49 -0700 Subject: [PATCH] Fix imports in docs Signed-off-by: Felix Wang --- docs/getting-started/concepts/feature-view.md | 8 ++++++++ docs/getting-started/concepts/point-in-time-joins.md | 2 ++ docs/reference/data-sources/push.md | 2 +- docs/reference/feature-repository.md | 2 +- docs/reference/feature-repository/README.md | 2 +- docs/tutorials/validating-historical-features.md | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/getting-started/concepts/feature-view.md b/docs/getting-started/concepts/feature-view.md index d9a5f9a04c..d94b1359cd 100644 --- a/docs/getting-started/concepts/feature-view.md +++ b/docs/getting-started/concepts/feature-view.md @@ -7,6 +7,8 @@ A feature view is an object that represents a logical group of time-series featu {% tabs %} {% tab title="driver_trips_feature_view.py" %} ```python +from feast import BigQuerySource, FeatureView, Field, Float32, Int64 + driver_stats_fv = FeatureView( name="driver_activity", entities=["driver"], @@ -39,6 +41,8 @@ If a feature view contains features that are not related to a specific entity, t {% tabs %} {% tab title="global_stats.py" %} ```python +from feast import BigQuerySource, FeatureView, Field, Int64 + global_stats_fv = FeatureView( name="global_stats", entities=[], @@ -70,6 +74,8 @@ It is suggested that you dynamically specify the new FeatureView name using `.wi {% tabs %} {% tab title="location_stats_feature_view.py" %} ```python +from feast import BigQuerySource, Entity, FeatureView, Field, Int32, ValueType + location = Entity(name="location", join_key="location_id", value_type=ValueType.INT64) location_stats_fv= FeatureView( @@ -115,6 +121,8 @@ A feature is an individual measurable property. It is typically a property obser Features are defined as part of feature views. Since Feast does not transform data, a feature is essentially a schema that only contains a name and a type: ```python +from feast import Field, Float32 + trips_today = Field( name="trips_today", dtype=Float32 diff --git a/docs/getting-started/concepts/point-in-time-joins.md b/docs/getting-started/concepts/point-in-time-joins.md index ccaacc9fca..163128437d 100644 --- a/docs/getting-started/concepts/point-in-time-joins.md +++ b/docs/getting-started/concepts/point-in-time-joins.md @@ -7,6 +7,8 @@ Feature values in Feast are modeled as time-series records. Below is an example The above table can be registered with Feast through the following feature view: ```python +from feast import FeatureView, Field, FileSource, Float32, Int64 + driver_stats_fv = FeatureView( name="driver_hourly_stats", entities=["driver"], diff --git a/docs/reference/data-sources/push.md b/docs/reference/data-sources/push.md index b16087cd43..df2858a3bc 100644 --- a/docs/reference/data-sources/push.md +++ b/docs/reference/data-sources/push.md @@ -14,7 +14,7 @@ When using a PushSource as a stream source in the definition of a feature view, ### Defining a push source ```python -from feast import PushSource, ValueType, BigQuerySource, FeatureView, Feature +from feast import PushSource, ValueType, BigQuerySource, FeatureView, Feature, Field, Int64 push_source = PushSource( name="push_source", diff --git a/docs/reference/feature-repository.md b/docs/reference/feature-repository.md index 6c54b2b021..703e970c9f 100644 --- a/docs/reference/feature-repository.md +++ b/docs/reference/feature-repository.md @@ -89,7 +89,7 @@ A feature repository can also contain one or more Python files that contain feat ```python from datetime import timedelta -from feast import BigQuerySource, Entity, Feature, FeatureView, ValueType +from feast import BigQuerySource, Entity, Feature, FeatureView, Field, Float32, String, ValueType driver_locations_source = BigQuerySource( table_ref="rh_prod.ride_hailing_co.drivers", diff --git a/docs/reference/feature-repository/README.md b/docs/reference/feature-repository/README.md index dcbd67aaea..c4d02d7b64 100644 --- a/docs/reference/feature-repository/README.md +++ b/docs/reference/feature-repository/README.md @@ -94,7 +94,7 @@ A feature repository can also contain one or more Python files that contain feat ```python from datetime import timedelta -from feast import BigQuerySource, Entity, Feature, FeatureView, ValueType +from feast import BigQuerySource, Entity, Feature, FeatureView, Field, Float32, String, ValueType driver_locations_source = BigQuerySource( table_ref="rh_prod.ride_hailing_co.drivers", diff --git a/docs/tutorials/validating-historical-features.md b/docs/tutorials/validating-historical-features.md index 057d337277..79d16a74b7 100644 --- a/docs/tutorials/validating-historical-features.md +++ b/docs/tutorials/validating-historical-features.md @@ -107,7 +107,7 @@ pyarrow.parquet.write_table(entities_2019_table, "entities.parquet") import pyarrow.parquet import pandas as pd -from feast import Feature, FeatureView, Entity, FeatureStore +from feast import Feature, FeatureView, Entity, FeatureStore, Field, Float64, Int64 from feast.value_type import ValueType from feast.data_format import ParquetFormat from feast.on_demand_feature_view import on_demand_feature_view