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 random tests
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Apr 11, 2022
commit 57ce1827544f79720c620c27ed6946f2c81da9ae
19 changes: 14 additions & 5 deletions sdk/python/tests/doctest/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ def setup_feature_store():
"""Prepares the local environment for a FeatureStore docstring test."""
from datetime import datetime, timedelta

from feast import Entity, Feature, FeatureStore, FeatureView, FileSource, ValueType
from feast import (
Entity,
FeatureStore,
FeatureView,
Field,
FileSource,
Float32,
Int64,
ValueType,
)
from feast.repo_operations import init_repo

init_repo("feature_repo", "local")
Expand All @@ -28,10 +37,10 @@ def setup_feature_store():
name="driver_hourly_stats",
entities=["driver_id"],
ttl=timedelta(seconds=86400 * 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),
],
batch_source=driver_hourly_stats,
)
Expand Down
25 changes: 13 additions & 12 deletions sdk/python/tests/unit/infra/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

from feast import BigQuerySource
from feast.entity import Entity
from feast.feature import Feature
from feast.feature_view import FeatureView
from feast.field import Field
from feast.infra.provider import _get_column_names
from feast.types import String
from feast.value_type import ValueType


Expand All @@ -29,17 +30,17 @@ def test_get_column_names_preserves_feature_ordering():
entities=["my-entity"],
ttl=timedelta(days=1),
batch_source=BigQuerySource(table="non-existent-mock"),
features=[
Feature(name="a", dtype=ValueType.STRING),
Feature(name="b", dtype=ValueType.STRING),
Feature(name="c", dtype=ValueType.STRING),
Feature(name="d", dtype=ValueType.STRING),
Feature(name="e", dtype=ValueType.STRING),
Feature(name="f", dtype=ValueType.STRING),
Feature(name="g", dtype=ValueType.STRING),
Feature(name="h", dtype=ValueType.STRING),
Feature(name="i", dtype=ValueType.STRING),
Feature(name="j", dtype=ValueType.STRING),
schema=[
Field(name="a", dtype=String),
Field(name="b", dtype=String),
Field(name="c", dtype=String),
Field(name="d", dtype=String),
Field(name="e", dtype=String),
Field(name="f", dtype=String),
Field(name="g", dtype=String),
Field(name="h", dtype=String),
Field(name="i", dtype=String),
Field(name="j", dtype=String),
],
)

Expand Down
11 changes: 6 additions & 5 deletions sdk/python/tests/utils/online_write_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@
from feast import FileSource
from feast.driver_test_data import create_driver_hourly_stats_df
from feast.entity import Entity
from feast.feature import Feature
from feast.feature_store import FeatureStore
from feast.feature_view import FeatureView
from feast.field import Field
from feast.infra.provider import _convert_arrow_to_proto
from feast.repo_config import RepoConfig
from feast.types import Float32, Int32
from feast.value_type import ValueType


def create_driver_hourly_stats_feature_view(source):
driver_stats_feature_view = FeatureView(
name="driver_stats",
entities=["driver_id"],
features=[
Feature(name="conv_rate", dtype=ValueType.FLOAT),
Feature(name="acc_rate", dtype=ValueType.FLOAT),
Feature(name="avg_daily_trips", dtype=ValueType.INT32),
schema=[
Field(name="conv_rate", dtype=Float32),
Field(name="acc_rate", dtype=Float32),
Field(name="avg_daily_trips", dtype=Int32),
],
batch_source=source,
ttl=timedelta(hours=2),
Expand Down