Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix java server after odfv update #2602

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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