Skip to content

Commit 0ca6297

Browse files
authored
fix: Fix java server after odfv update (#2602)
Signed-off-by: Kevin Zhang <[email protected]>
1 parent 38cd7f9 commit 0ca6297

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

docs/getting-started/concepts/feature-view.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ input_request = RequestSource(
157157

158158
# Use the input data and feature view features to create new features
159159
@on_demand_feature_view(
160-
sources={
161-
'driver_hourly_stats': driver_hourly_stats_view,
162-
'vals_to_add': input_request
163-
},
160+
sources=[
161+
driver_hourly_stats_view,
162+
input_request
163+
],
164164
schema=[
165165
Field(name='conv_rate_plus_val1', dtype=Float64),
166166
Field(name='conv_rate_plus_val2', dtype=Float64)

docs/reference/alpha-on-demand-feature-view.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ There are new CLI commands:
2121

2222
## Example
2323

24-
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.
24+
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.
2525

2626
### **Registering transformations**
2727

@@ -32,7 +32,7 @@ from feast import Field, RequestSource
3232
from feast.types import Float64, Int64
3333
import pandas as pd
3434

35-
# Define a request data source which encodes features / information only
35+
# Define a request data source which encodes features / information only
3636
# available at request time (e.g. part of the user initiated HTTP request)
3737
input_request = RequestSource(
3838
name="vals_to_add",
@@ -44,10 +44,10 @@ input_request = RequestSource(
4444

4545
# Use the input data and feature view features to create new features
4646
@on_demand_feature_view(
47-
sources={
48-
'driver_hourly_stats': driver_hourly_stats_view,
49-
'vals_to_add': input_request
50-
},
47+
sources=[
48+
driver_hourly_stats_view,
49+
input_request
50+
],
5151
schema=[
5252
Field(name='conv_rate_plus_val1', dtype=Float64),
5353
Field(name='conv_rate_plus_val2', dtype=Float64)
@@ -63,7 +63,7 @@ def transformed_conv_rate(features_df: pd.DataFrame) -> pd.DataFrame:
6363
### **Feature retrieval**
6464

6565
{% hint style="info" %}
66-
The on demand feature view's name is the function name \(i.e. `transformed_conv_rate`\).
66+
The on demand feature view's name is the function name \(i.e. `transformed_conv_rate`\).
6767
{% endhint %}
6868

6969
And then to retrieve historical or online features, we can call this in a feature service or reference individual features:

examples/java-demo/feature_repo/driver_repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# Define an on demand feature view which can generate new features based on
4444
# existing feature views and RequestSource features
4545
@on_demand_feature_view(
46-
inputs=[
46+
sources=[
4747
driver_hourly_stats_view,
4848
input_request,
4949
],

java/serving/src/test/resources/docker-compose/feast10/definitions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050

5151

5252
@on_demand_feature_view(
53-
sources={
54-
"driver_hourly_stats": driver_hourly_stats_view,
55-
"vals_to_add": input_request,
56-
},
53+
sources=[
54+
driver_hourly_stats_view,
55+
input_request,
56+
],
5757
schema=[
5858
Field(name="conv_rate_plus_val1", dtype=Float64),
5959
Field(name="conv_rate_plus_val2", dtype=Float64),

ui/feature_repo/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
# Define an on demand feature view which can generate new features based on
141141
# existing feature views and RequestSource features
142142
@on_demand_feature_view(
143-
sources={"credit_history": credit_history, "transaction": input_request,},
143+
sources=[credit_history, input_request],
144144
schema=[
145145
Field(name="transaction_gt_last_credit_card_due", dtype=Bool),
146146
],

0 commit comments

Comments
 (0)