Skip to content

Commit

Permalink
GitBook: [master] 3 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
adchia authored and gitbook-bot committed Sep 22, 2021
1 parent e893e7f commit e9b22bb
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/getting-started/concepts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@

{% page-ref page="feature-retrieval.md" %}

{% page-ref page="point-in-time-joins.md" %}



4 changes: 4 additions & 0 deletions docs/getting-started/concepts/feature-retrieval.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ online_features = fs.get_online_features(

It is possible to retrieve features from multiple feature views with a single request, and Feast is able to join features from multiple tables in order to build a training dataset. However, It is not possible to reference \(or retrieve\) features from multiple projects at the same time.

{% hint style="info" %}
Note, if you're using [Feature views without entities](feature-view.md#feature-views-without-entities), then those features can be added here without additional entity values in the `entity_rows`
{% endhint %}

## Event timestamp

The timestamp on which an event occurred, as found in a feature view's data source. The entity timestamp describes the event time at which a feature was observed or generated.
Expand Down
35 changes: 35 additions & 0 deletions docs/getting-started/concepts/feature-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,38 @@ Together with [data sources](data-source.md), they indicate to Feast where to fi

Feature names must be unique within a [feature view](feature-view.md#feature-view).

## \[Alpha\] On demand feature views

On demand feature views allows users to use existing features and request time data \(features only available at request time\) to transform and create new features. Users define python transformation logic which is executed in both historical retrieval and online retrieval paths:

```python
# 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 = RequestDataSource(
name="vals_to_add",
schema={
"val_to_add": ValueType.INT64,
"val_to_add_2": ValueType.INT64
}
)

# Use the input data and feature view features to create new features
@on_demand_feature_view(
inputs={
'driver_hourly_stats': driver_hourly_stats_view,
'vals_to_add': input_request
},
features=[
Feature(name='conv_rate_plus_val1', dtype=ValueType.DOUBLE),
Feature(name='conv_rate_plus_val2', dtype=ValueType.DOUBLE)
]
)
def transformed_conv_rate(features_df: pd.DataFrame) -> pd.DataFrame:
df = pd.DataFrame()
df['conv_rate_plus_val1'] = (features_df['conv_rate'] + features_df['val_to_add'])
df['conv_rate_plus_val2'] = (features_df['conv_rate'] + features_df['val_to_add_2'])
return df
```



0 comments on commit e9b22bb

Please sign in to comment.