-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Feast CLI / python SDK documentation (#199)
* Storage registration quickstart For Feast admins. * Minimum requirements for Feast GKE cluster * Storage specs quickstart for admins * WIP - End user quickstart * Example spec files * Updated protobuf generated files Using vendored protobuf, here are the new generated files * Removed references to granularity from the docs * Removed references to granularity from the docs * Added info on how to register features and run an import job from CLI; other fixes in the docs; * fix typos * - WIP on python SDK quickstart documentation * - add training/serving data retrieval sections * - setting core/serving tags in helm to latest release version * - removed storage options from feature declaration specs * Update doc for CLI * Typo * Update default values.yaml for Feast Use Feast image tag 0.1.1 because it fixes some templating in BigQuery https://github.com/gojek/feast/releases/tag/v0.1.1 * Fix incorrect destination path when installing feast cli
- Loading branch information
1 parent
7548e61
commit 1bdbfb5
Showing
16 changed files
with
683 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Feast End Users Quickstart Guide | ||
|
||
## Pre-requisities | ||
|
||
* A working Feast Core: Consult your Feast admin or [install your own](install.md). | ||
* Feast CLI tools: Use [pre-built | ||
binaries](https://github.com/gojek/feast/releases) or [compile your | ||
own](../cli/README.md). | ||
|
||
Make sure your CLI is correctly configured for your Feast Core. If | ||
you're running a local Feast Core, it would be: | ||
```sh | ||
feast config set coreURI localhost | ||
``` | ||
|
||
## Introduction | ||
|
||
There are several stages to using Feast: | ||
1. Register your feature | ||
2. Ingest data for your feature | ||
3. Query feature data for training your models | ||
4. Query feature data for serving your models | ||
|
||
## Registering your feature | ||
|
||
In order to register a feature, you will first need to register a: | ||
* Storage location (typically done by your Feast admin) | ||
* Entity | ||
|
||
All registrations are done using [specs](specs.md). | ||
|
||
### Registering an entity | ||
|
||
Then register an entity, which is for grouping features under a unique | ||
key or id. Typically these map to a domain object, e.g., a customer, a | ||
merchant, a sales region. | ||
|
||
[`wordEntity.yml`](../examples/wordEntity.yml) | ||
``` | ||
name: word | ||
description: word found in shakespearean works | ||
``` | ||
|
||
Register the entity spec: | ||
```sh | ||
feast apply entity wordEntity.yml | ||
``` | ||
|
||
### Registering your feature | ||
|
||
Next, define your feature: | ||
|
||
[`wordCountFeature.yml`](../examples/wordCountFeature.yml) | ||
``` | ||
id: word.count | ||
name: count | ||
entity: word | ||
owner: bob@feast.com | ||
description: number of times the word appears | ||
valueType: INT64 | ||
uri: https://github.com/bob/example | ||
``` | ||
|
||
Register it: | ||
```sh | ||
feast apply feature wordCountFeature.yml | ||
``` | ||
|
||
## Ingest data for your feature | ||
|
||
Feast supports ingesting feature from 4 type of sources: | ||
|
||
* File (either CSV or JSON) | ||
* Bigquery Table | ||
* Pubsub Topic | ||
* Pubsub Subscription | ||
|
||
Let's take a look on how to create an import job spec and ingest some data from a CSV file. | ||
You may find more information on how to ingest data from different sources | ||
here: [[Import Specs]](specs.md#import-spec) | ||
|
||
### Prepare your data | ||
`word_counts.csv` | ||
```csv | ||
count,word | ||
28944,the | ||
27317,and | ||
21120,i | ||
20136,to | ||
17181,of | ||
14945,a | ||
13989,you | ||
12949,my | ||
11513,in | ||
11488,that | ||
9545,is | ||
8855,not | ||
8293,with | ||
8043,me | ||
8003,it | ||
... | ||
``` | ||
|
||
And then upload it into your Google Storage bucket: | ||
|
||
```sh | ||
gsutil cp word_counts.csv gs://your-bucket | ||
``` | ||
|
||
### Define the job import spec | ||
`shakespeareWordCountsImport.yml` | ||
```yaml | ||
type: file.csv | ||
sourceOptions: | ||
path: gs://your-bucket/word_counts.csv | ||
entities: | ||
- word | ||
schema: | ||
entityIdColumn: word | ||
timestampValue: 2019-01-01T00:00:00.000Z | ||
fields: | ||
- name: count | ||
featureId: word.count | ||
- name: word | ||
``` | ||
### Start the ingestion job | ||
Next, use `feast` CLI to run your ingestion job, defined in | ||
`shakespeareWordCountsImport.yml`: | ||
```sh | ||
feast jobs run shakespeareWordCountsImport.yml | ||
``` | ||
|
||
You can also list recent ingestion jobs by running: | ||
```sh | ||
feast list jobs | ||
``` | ||
|
||
Or get detailed information about the results of ingestion with: | ||
```sh | ||
feast get job <id> | ||
``` | ||
|
Oops, something went wrong.