diff --git a/docs/getting-started/concepts/feature-view.md b/docs/getting-started/concepts/feature-view.md index e3decf39c9..d0b8004828 100644 --- a/docs/getting-started/concepts/feature-view.md +++ b/docs/getting-started/concepts/feature-view.md @@ -157,10 +157,10 @@ input_request = RequestSource( # Use the input data and feature view features to create new features @on_demand_feature_view( - sources={ - 'driver_hourly_stats': driver_hourly_stats_view, - 'vals_to_add': input_request - }, + sources=[ + driver_hourly_stats_view, + input_request + ], schema=[ Field(name='conv_rate_plus_val1', dtype=Float64), Field(name='conv_rate_plus_val2', dtype=Float64) diff --git a/docs/reference/alpha-on-demand-feature-view.md b/docs/reference/alpha-on-demand-feature-view.md index 6be55fb735..eb8c4f6291 100644 --- a/docs/reference/alpha-on-demand-feature-view.md +++ b/docs/reference/alpha-on-demand-feature-view.md @@ -21,7 +21,7 @@ There are new CLI commands: ## Example -See [https://github.com/feast-dev/on-demand-feature-views-demo](https://github.com/feast-dev/on-demand-feature-views-demo) for an example on how to use on demand feature views. +See [https://github.com/feast-dev/on-demand-feature-views-demo](https://github.com/feast-dev/on-demand-feature-views-demo) for an example on how to use on demand feature views. ### **Registering transformations** @@ -32,7 +32,7 @@ from feast import Field, RequestSource from feast.types import Float64, Int64 import pandas as pd -# Define a request data source which encodes features / information only +# Define a request data source which encodes features / information only # available at request time (e.g. part of the user initiated HTTP request) input_request = RequestSource( name="vals_to_add", @@ -44,10 +44,10 @@ input_request = RequestSource( # Use the input data and feature view features to create new features @on_demand_feature_view( - sources={ - 'driver_hourly_stats': driver_hourly_stats_view, - 'vals_to_add': input_request - }, + sources=[ + driver_hourly_stats_view, + input_request + ], schema=[ Field(name='conv_rate_plus_val1', dtype=Float64), Field(name='conv_rate_plus_val2', dtype=Float64) @@ -63,7 +63,7 @@ def transformed_conv_rate(features_df: pd.DataFrame) -> pd.DataFrame: ### **Feature retrieval** {% hint style="info" %} -The on demand feature view's name is the function name \(i.e. `transformed_conv_rate`\). +The on demand feature view's name is the function name \(i.e. `transformed_conv_rate`\). {% endhint %} And then to retrieve historical or online features, we can call this in a feature service or reference individual features: diff --git a/examples/java-demo/feature_repo/driver_repo.py b/examples/java-demo/feature_repo/driver_repo.py index c9bdc7ce77..c91e5a40be 100644 --- a/examples/java-demo/feature_repo/driver_repo.py +++ b/examples/java-demo/feature_repo/driver_repo.py @@ -43,7 +43,7 @@ # Define an on demand feature view which can generate new features based on # existing feature views and RequestSource features @on_demand_feature_view( - inputs=[ + sources=[ driver_hourly_stats_view, input_request, ], diff --git a/java/serving/src/test/resources/docker-compose/feast10/definitions.py b/java/serving/src/test/resources/docker-compose/feast10/definitions.py index 374408a20b..e514ef0d23 100644 --- a/java/serving/src/test/resources/docker-compose/feast10/definitions.py +++ b/java/serving/src/test/resources/docker-compose/feast10/definitions.py @@ -50,10 +50,10 @@ @on_demand_feature_view( - sources={ - "driver_hourly_stats": driver_hourly_stats_view, - "vals_to_add": input_request, - }, + sources=[ + driver_hourly_stats_view, + input_request, + ], schema=[ Field(name="conv_rate_plus_val1", dtype=Float64), Field(name="conv_rate_plus_val2", dtype=Float64), diff --git a/ui/feature_repo/features.py b/ui/feature_repo/features.py index 0f74b424e7..8a5e6153df 100644 --- a/ui/feature_repo/features.py +++ b/ui/feature_repo/features.py @@ -140,7 +140,7 @@ # Define an on demand feature view which can generate new features based on # existing feature views and RequestSource features @on_demand_feature_view( - sources={"credit_history": credit_history, "transaction": input_request,}, + sources=[credit_history, input_request], schema=[ Field(name="transaction_gt_last_credit_card_due", dtype=Bool), ],