Skip to content

Commit

Permalink
Fix imports in docs
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Apr 11, 2022
1 parent f93c844 commit 2267064
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/getting-started/concepts/feature-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -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=[],
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/getting-started/concepts/point-in-time-joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/data-sources/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/feature-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/feature-repository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/validating-historical-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2267064

Please sign in to comment.