From 1b809a73e7e55bc8282c9de2f441561c3540ea7d Mon Sep 17 00:00:00 2001 From: Felix Wang Date: Fri, 10 Sep 2021 18:52:12 +0000 Subject: [PATCH] GitBook: [master] 62 pages modified --- .../data-model-and-concepts/feature-view.md | 34 +++++++++++-------- docs/getting-started/faq.md | 4 +++ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/docs/getting-started/concepts/data-model-and-concepts/feature-view.md b/docs/getting-started/concepts/data-model-and-concepts/feature-view.md index 104cc832ef..3f8466e57e 100644 --- a/docs/getting-started/concepts/data-model-and-concepts/feature-view.md +++ b/docs/getting-started/concepts/data-model-and-concepts/feature-view.md @@ -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" %} @@ -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" @@ -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. diff --git a/docs/getting-started/faq.md b/docs/getting-started/faq.md index 8b40e25b89..9b957b7ed1 100644 --- a/docs/getting-started/faq.md +++ b/docs/getting-started/faq.md @@ -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?