Skip to content

Commit

Permalink
GitBook: [master] 62 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
felixwang9817 authored and gitbook-bot committed Sep 10, 2021
1 parent c2c1384 commit 1b809a7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Feature view

## Feature View
## Feature views

A feature view is an object that represents a logical group of time-series feature data as it is found in a [data source](data-source.md). Feature views consist of zero or more [entities](entity.md), one or more [features](feature-view.md#feature), and a [data source](data-source.md). Feature views allow Feast to model your existing feature data in a consistent way in both an offline \(training\) and online \(serving\) environment. If a feature view contains features that are properties of a specific object, that object is typically defined as an entity and included in the feature view. If a feature view contains features that are not related to a specific entity, for example global features, the feature view can be defined without entities.
A feature view is an object that represents a logical group of time-series feature data as it is found in a [data source](data-source.md). Feature views consist of zero or more [entities](entity.md), one or more [features](feature-view.md#feature), and a [data source](data-source.md). Feature views allow Feast to model your existing feature data in a consistent way in both an offline \(training\) and online \(serving\) environment. Feature views generally contain features that are properties of a specific object, in which case that object is defined as an entity and included in the feature view. If the features are not related to a specific object, the feature view might not have entities; see [feature views without entities](feature-view.md#feature-views-without-entities) below.

{% tabs %}
{% tab title="driver\_trips\_feature\_view.py" %}
Expand All @@ -20,14 +20,30 @@ driver_stats_fv = FeatureView(
)
```
{% endtab %}
{% endtabs %}

Feature views are used during

* The generation of training datasets by querying the data source of feature views in order to find historical feature values. A single training dataset may consist of features from multiple feature views.
* Loading of feature values into an online store. Feature views determine the storage schema in the online store.
* Retrieval of features from the online store. Feature views provide the schema definition to Feast in order to look up features from the online store.

{% hint style="info" %}
Feast does not generate feature values. It acts as the ingestion and serving system. The data sources described within feature views should reference feature values in their already computed form.
{% endhint %}

## Feature views without entities

{% tab title="global\_feature\_view.py" %}
If a feature view contains features that are not related to a specific entity, the feature view can be defined without entities.

{% tabs %}
{% tab title="global\_stats.py" %}
```python
global_stats_fv = FeatureView(
name="global_stats",
entities=[],
features=[
Feature(name="total_trips_today", dtype=ValueType.INT64),
Feature(name="total_trips_today_by_all_drivers", dtype=ValueType.INT64),
],
batch_source=BigQuerySource(
table_ref="feast-oss.demo_data.global_stats"
Expand All @@ -37,16 +53,6 @@ global_stats_fv = FeatureView(
{% endtab %}
{% endtabs %}

Feature views are used during

* The generation of training datasets by querying the data source of feature views in order to find historical feature values. A single training dataset may consist of features from multiple feature views.
* Loading of feature values into an online store. Feature views determine the storage schema in the online store.
* Retrieval of features from the online store. Feature views provide the schema definition to Feast in order to look up features from the online store.

{% hint style="info" %}
Feast does not generate feature values. It acts as the ingestion and serving system. The data sources described within feature views should reference feature values in their already computed form.
{% endhint %}

## Feature

A feature is an individual measurable property. It is typically a property observed on a specific entity, but does not have to be associated with an entity. For example, a feature of a `customer` entity could be the number of transactions they have made on an average month, while a feature that is not observed on a specific entity could be the total number of posts made by all users in the last month.
Expand Down
4 changes: 4 additions & 0 deletions docs/getting-started/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ The [quickstart](quickstart.md) is the easiest way to learn about Feast. For mor

Feature tables from Feast 0.9 have been renamed to feature views in Feast 0.10+. For more details, please see the discussion [here](https://github.com/feast-dev/feast/issues/1583).

### Do feature views have to include entities?

No, there are [feature views without entities](concepts/data-model-and-concepts/feature-view.md#feature-views-without-entities).

## Functionality

### Does Feast provide security or access control?
Expand Down

0 comments on commit 1b809a7

Please sign in to comment.