Skip to content

Commit

Permalink
fix: Fix java server after odfv update (#2602)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
  • Loading branch information
kevjumba authored Apr 22, 2022
1 parent 38cd7f9 commit 0ca6297
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/getting-started/concepts/feature-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions docs/reference/alpha-on-demand-feature-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -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",
Expand All @@ -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)
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion examples/java-demo/feature_repo/driver_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion ui/feature_repo/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
],
Expand Down

0 comments on commit 0ca6297

Please sign in to comment.