You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 02df03a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/getting-started/deploying-feast/docker-compose.md
+39-20Lines changed: 39 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,41 +22,56 @@ The docker compose setup uses Direct Runner for the Apache Beam jobs that popula
22
22
### 0. Requirements
23
23
24
24
*[Docker compose](https://docs.docker.com/compose/install/) must be installed.
25
-
* The following list of TCP ports must be free:
26
-
* 6565, 6566, 8888, and 9094.
27
-
* Alternatively it is possible to modify port mappings in `/docker-compose/docker-compose.yml`.
28
25
*\(for batch serving only\) For batch serving you will also need a [GCP service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) that has access to [Google Cloud Storage](https://cloud.google.com/storage) and [BigQuery](https://cloud.google.com/bigquery).
29
-
*\(for batch serving only\)[Google Cloud SDK ](https://cloud.google.com/sdk/install)installed, authenticated, and configured to the project you will use.
26
+
*\(for batch serving only\)[Google Cloud SDK ](https://cloud.google.com/sdk/install)installed, authenticated, and configured to the GCP project you will use.
30
27
31
28
## 1. Set up environment
32
29
33
-
Clone the [Feast repository](https://github.com/feast-dev/feast/) and navigate to the `docker-compose` sub-directory:
If you do not require batch serving, then its possible to simply bring up Feast:
46
+
Run the following command if you would like to start both Feast Core and Feast Serving at the same time. The Feast Serving online deployment will use Redis as its database.
52
47
53
48
```javascript
54
-
docker-compose up -d
49
+
docker-compose \
50
+
-f docker-compose.yml \
51
+
-f docker-compose.online.yml \
52
+
up -d
53
+
```
54
+
55
+
If you already have Feast Core running \(externally or from the earlier section\), then you can optionally bring up only the Feast Serving online deployment for Redis.
56
+
57
+
```javascript
58
+
docker-compose -f docker-compose.online.yml up -d
55
59
```
56
60
57
-
A Jupyter Notebook environment is now available to use Feast:
61
+
Your Feast deployment should now be starting up. Have a look at the docker logs, especially that of the Jupyter container:
Copy file name to clipboardExpand all lines: docs/user-guide/statistics.md
+43-44Lines changed: 43 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,9 @@
2
2
3
3
Data is a first-class citizen in machine learning projects, it is critical to have tests and validations around data. To that end, Feast avails various feature statistics to users in order to give users visibility into the data that has been ingested into the system.
Feast exposes feature statistics at two points in the Feast system:
8
-
1. Inflight feature statistics from the population job
9
-
2. Historical feature statistics from the warehouse stores
7
+
Feast exposes feature statistics at two points in the Feast system: 1. Inflight feature statistics from the population job 2. Historical feature statistics from the warehouse stores
10
8
11
9
## Historical Feature Statistics
12
10
@@ -15,10 +13,10 @@ Feast supports the computation of feature statistics over data already written t
15
13
### Retrieving Statistics
16
14
17
15
Statistics can be retrieved from Feast using the python SDK's `get_statistics` method. This requires a connection to Feast core.
18
-
16
+
19
17
Feature statistics can be retrieved for a single feature set, from a single valid warehouse store. Users can opt to either retrieve feature statistics for a discrete subset of data by providing an `ingestion_id` , a unique id generated for a dataset when it is ingested into feast:
20
18
21
-
```{python}
19
+
```text
22
20
# A unique ingestion id is returned for each batch ingestion
23
21
ingestion_id=client.ingest(feature_set,df)
24
22
@@ -29,9 +27,9 @@ stats = client.get_statistics(
29
27
ingestion_ids=[ingestion_id])
30
28
```
31
29
32
-
Or by selecting data within a time range by providing a `start_date` and `end_date` (the start date is inclusive, the end date is not):
30
+
Or by selecting data within a time range by providing a `start_date` and `end_date`\(the start date is inclusive, the end date is not\):
33
31
34
-
```{python}
32
+
```text
35
33
start_date=datetime(2020,10,1,0,0,0)
36
34
end_date=datetime(2020,10,2,0,0,0)
37
35
@@ -51,15 +49,15 @@ Note that when providing a time range, Feast will NOT filter out duplicated rows
51
49
52
50
Feast returns the statistics in the form of the protobuf [DatasetFeatureStatisticsList](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto#L36), which can be subsequently passed to TFDV methods to [validate the dataset](https://www.tensorflow.org/tfx/data_validation/get_started#checking_the_data_for_errors)...
Or [visualise the statistics](https://www.tensorflow.org/tfx/data_validation/get_started#computing_descriptive_data_statistics) in [facets](https://github.com/PAIR-code/facets).
61
59
62
-
```{python}
60
+
```text
63
61
tfdv.visualize_statistics(stats)
64
62
```
65
63
@@ -69,23 +67,23 @@ Refer to the [example notebook](https://github.com/feast-dev/feast/blob/master/e
69
67
70
68
Feast supports retrieval of feature statistics across multiple datasets or days.
71
69
72
-
```{python}
70
+
```text
73
71
stats = client.get_statistics(
74
72
feature_set_id='project/feature_set',
75
73
store='warehouse',
76
74
features=['feature_1', 'feature_2'],
77
75
ingestion_ids=[ingestion_id_1, ingestion_id_2])
78
76
```
79
77
80
-
However, when querying across multiple datasets, Feast computes the statistics for each dataset independently (for caching purposes), and aggregates the results. As a result of this, certain un-aggregatable statistics are dropped in the process, such as medians, uniqueness counts, and histograms.
78
+
However, when querying across multiple datasets, Feast computes the statistics for each dataset independently \(for caching purposes\), and aggregates the results. As a result of this, certain un-aggregatable statistics are dropped in the process, such as medians, uniqueness counts, and histograms.
81
79
82
80
Refer to the table below for the list of statistics that will be dropped.
83
81
84
82
### Caching
85
83
86
84
Feast caches the results of all feature statistics requests, and will, by default, retrieve and return the cached results. To recompute previously computed feature statistics, set `force_refresh` to `true` when retrieving the statistics:
87
85
88
-
```{python}
86
+
```text
89
87
stats=client.get_statistics(
90
88
feature_set_id='project/feature_set',
91
89
store='warehouse',
@@ -100,45 +98,45 @@ This will force Feast to recompute the statistics, and replace any previously ca
100
98
101
99
Feast supports most, but not all of the feature statistics defined in TFX's [FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto#L147). For the definition of each statistic and information about how each one is computed, refer to the [protobuf definition](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto#L147).
For insight into data currently flowing into Feast through the population jobs, [statsd](https://github.com/statsd/statsd) is used to capture feature value statistics.
133
131
134
-
Inflight feature statistics are windowed (default window length is 30s) and computed at two points in the feature population pipeline:
132
+
Inflight feature statistics are windowed \(default window length is 30s\) and computed at two points in the feature population pipeline:
135
133
136
134
1. Prior to store writes, after successful validation
137
135
2. After successful store writes
138
136
139
137
The following metrics are written at the end of each window as [statsd gauges](https://github.com/statsd/statsd/blob/master/docs/metric_types.md#gauges):
140
138
141
-
```
139
+
```text
142
140
feast_ingestion_feature_value_min
143
141
feast_ingestion_feature_value_max
144
142
feast_ingestion_feature_value_mean
@@ -156,9 +154,10 @@ the gauge metric type is used over histogram because statsd only supports positi
156
154
The metrics are tagged with and can be aggregated by the following keys:
157
155
158
156
| key | description |
159
-
| --- | --- |
160
-
| feast_store | store the population job is writing to
161
-
| feast_project_name | feast project name
162
-
| feast_featureSet_name | feature set name
163
-
| feast_feature_name | feature name
164
-
| ingestion_job_name | id of the population job writing the feature values.
157
+
| :--- | :--- |
158
+
| feast\_store | store the population job is writing to |
159
+
| feast\_project\_name | feast project name |
160
+
| feast\_featureSet\_name | feature set name |
161
+
| feast\_feature\_name | feature name |
162
+
| ingestion\_job\_name | id of the population job writing the feature values. |
0 commit comments