Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
93953d5
Add type annotation
felixwang9817 Apr 6, 2022
7057016
Switch from Feature to Field for FeatureViewProjection
felixwang9817 Apr 8, 2022
8de4c6b
Switch from Feature to Field for BaseFeatureView
felixwang9817 Apr 8, 2022
b32bea6
Switch from Feature to Field for RequestFeatureView
felixwang9817 Apr 8, 2022
05f2514
Enforce kwargs for ODFVs and switch from Feature to Field and from `f…
felixwang9817 Apr 8, 2022
58d02c1
Switch from Feature to Field and from `features` to `schema` for Feat…
felixwang9817 Apr 8, 2022
ba0f12e
Fix references to `features` and Feature
felixwang9817 Apr 8, 2022
13c874b
Switch from `Feature` to `Field` for ODFV in tests
felixwang9817 Apr 8, 2022
1d1e603
Switch from Feature to Field in templates
felixwang9817 Apr 9, 2022
1dc0942
Switch from Feature to Field in example test repos
felixwang9817 Apr 9, 2022
02cf8af
Switch from Feature to Field in registration integration tests
felixwang9817 Apr 9, 2022
d5e391b
Switch from Feature to Field in non-registration integration tests
felixwang9817 Apr 9, 2022
57ce182
Switch from Feature to Field in random tests
felixwang9817 Apr 9, 2022
7f5526f
Switch from Feature to Field in ui
felixwang9817 Apr 9, 2022
901a639
Switch from Feature to Field in some universal feature views
felixwang9817 Apr 9, 2022
bb2fe9d
Switch from Feature to Field in docs
felixwang9817 Apr 9, 2022
f93c844
Add assertion that BaseFeatureView is always initialized with a name
felixwang9817 Apr 11, 2022
2267064
Fix imports in docs
felixwang9817 Apr 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Switch from Feature to Field in templates
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Apr 9, 2022
commit 1d1e60370e5b044f235adcc2619d278163b088a8
10 changes: 5 additions & 5 deletions sdk/python/feast/templates/aws/driver_repo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import timedelta

from feast import Entity, Feature, FeatureView, RedshiftSource, ValueType
from feast import Entity, FeatureView, Field, Float32, Int64, RedshiftSource, ValueType

# Define an entity for the driver. Entities can be thought of as primary keys used to
# retrieve features. Entities are also used to join multiple tables/views during the
Expand Down Expand Up @@ -51,10 +51,10 @@
# The list of features defined below act as a schema to both define features
# for both materialization of features into a store, and are used as references
# during retrieval for building a training dataset or serving features
features=[
Feature(name="conv_rate", dtype=ValueType.FLOAT),
Feature(name="acc_rate", dtype=ValueType.FLOAT),
Feature(name="avg_daily_trips", dtype=ValueType.INT64),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int64),
],
# Batch sources are used to find feature values. In the case of this feature
# view we will query a source table on Redshift for driver statistics
Expand Down
10 changes: 5 additions & 5 deletions sdk/python/feast/templates/gcp/driver_repo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import timedelta

from feast import BigQuerySource, Entity, Feature, FeatureView, ValueType
from feast import BigQuerySource, Entity, FeatureView, Field, Float32, Int64, ValueType

# Define an entity for the driver. Entities can be thought of as primary keys used to
# retrieve features. Entities are also used to join multiple tables/views during the
Expand Down Expand Up @@ -49,10 +49,10 @@
# The list of features defined below act as a schema to both define features
# for both materialization of features into a store, and are used as references
# during retrieval for building a training dataset or serving features
features=[
Feature(name="conv_rate", dtype=ValueType.FLOAT),
Feature(name="acc_rate", dtype=ValueType.FLOAT),
Feature(name="avg_daily_trips", dtype=ValueType.INT64),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int64),
],
# Batch sources are used to find feature values. In the case of this feature
# view we will query a source table on BigQuery for driver statistics
Expand Down
10 changes: 5 additions & 5 deletions sdk/python/feast/templates/local/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from datetime import timedelta

from feast import Entity, Feature, FeatureView, FileSource, ValueType
from feast import Entity, FeatureView, Field, FileSource, Float32, Int64, ValueType

# 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
Expand All @@ -24,10 +24,10 @@
name="driver_hourly_stats",
entities=["driver_id"],
ttl=timedelta(days=1),
features=[
Feature(name="conv_rate", dtype=ValueType.FLOAT),
Feature(name="acc_rate", dtype=ValueType.FLOAT),
Feature(name="avg_daily_trips", dtype=ValueType.INT64),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int64),
],
online=True,
batch_source=driver_hourly_stats,
Expand Down
10 changes: 5 additions & 5 deletions sdk/python/feast/templates/snowflake/driver_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import yaml

from feast import Entity, Feature, FeatureView, SnowflakeSource, ValueType
from feast import Entity, FeatureView, Field, Float32, Int64, SnowflakeSource

# Define an entity for the driver. Entities can be thought of as primary keys used to
# retrieve features. Entities are also used to join multiple tables/views during the
Expand Down Expand Up @@ -53,10 +53,10 @@
# The list of features defined below act as a schema to both define features
# for both materialization of features into a store, and are used as references
# during retrieval for building a training dataset or serving features
features=[
Feature(name="conv_rate", dtype=ValueType.FLOAT),
Feature(name="acc_rate", dtype=ValueType.FLOAT),
Feature(name="avg_daily_trips", dtype=ValueType.INT64),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int64),
],
# Batch sources are used to find feature values. In the case of this feature
# view we will query a source table on Redshift for driver statistics
Expand Down
18 changes: 9 additions & 9 deletions sdk/python/feast/templates/spark/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from datetime import timedelta
from pathlib import Path

from feast import Entity, Feature, FeatureView, ValueType
from feast import Entity, FeatureView, Field, Float32, Int64, ValueType
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
SparkSource,
)
Expand Down Expand Up @@ -41,10 +41,10 @@
name="driver_hourly_stats",
entities=["driver_id"],
ttl=timedelta(days=7),
features=[
Feature(name="conv_rate", dtype=ValueType.FLOAT),
Feature(name="acc_rate", dtype=ValueType.FLOAT),
Feature(name="avg_daily_trips", dtype=ValueType.INT64),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int64),
],
online=True,
batch_source=driver_hourly_stats,
Expand All @@ -54,10 +54,10 @@
name="customer_daily_profile",
entities=["customer_id"],
ttl=timedelta(days=7),
features=[
Feature(name="current_balance", dtype=ValueType.FLOAT),
Feature(name="avg_passenger_count", dtype=ValueType.FLOAT),
Feature(name="lifetime_trip_count", dtype=ValueType.INT64),
schema=[
Field(name="current_balance", dtype=Float32),
Field(name="avg_passenger_count", dtype=Float32),
Field(name="lifetime_trip_count", dtype=Int64),
],
online=True,
batch_source=customer_daily_profile,
Expand Down