From bcde20c2795dfd58bea97dfbba639491d372f96d Mon Sep 17 00:00:00 2001 From: Theodor Mihalache Date: Fri, 11 Oct 2024 13:39:08 -0400 Subject: [PATCH 1/4] fix: changes following issue 4593 Signed-off-by: Theodor Mihalache --- docs/getting-started/concepts/README.md | 4 ++ docs/getting-started/concepts/feature-view.md | 2 +- docs/getting-started/concepts/overview.md | 6 +-- docs/getting-started/concepts/project.md | 19 ++++++++ docs/getting-started/quickstart.md | 35 +++++++++++---- sdk/python/feast/templates/athena/.gitignore | 44 +++++++++++++++++++ sdk/python/feast/templates/aws/.gitignore | 44 +++++++++++++++++++ .../feast/templates/cassandra/.gitignore | 44 +++++++++++++++++++ .../feast/templates/cassandra/bootstrap.py | 4 +- sdk/python/feast/templates/gcp/.gitignore | 44 +++++++++++++++++++ .../feast/templates/hazelcast/.gitignore | 44 +++++++++++++++++++ .../feast/templates/hazelcast/bootstrap.py | 4 +- sdk/python/feast/templates/hbase/.gitignore | 44 +++++++++++++++++++ sdk/python/feast/templates/hbase/bootstrap.py | 4 +- sdk/python/feast/templates/local/.gitignore | 44 +++++++++++++++++++ sdk/python/feast/templates/local/bootstrap.py | 8 +++- sdk/python/feast/templates/minimal/.gitignore | 44 +++++++++++++++++++ .../feast/templates/postgres/.gitignore | 44 +++++++++++++++++++ .../feast/templates/snowflake/.gitignore | 44 +++++++++++++++++++ sdk/python/feast/templates/spark/.gitignore | 44 +++++++++++++++++++ 20 files changed, 550 insertions(+), 20 deletions(-) create mode 100644 docs/getting-started/concepts/project.md create mode 100644 sdk/python/feast/templates/athena/.gitignore create mode 100644 sdk/python/feast/templates/aws/.gitignore create mode 100644 sdk/python/feast/templates/cassandra/.gitignore create mode 100644 sdk/python/feast/templates/gcp/.gitignore create mode 100644 sdk/python/feast/templates/hazelcast/.gitignore create mode 100644 sdk/python/feast/templates/hbase/.gitignore create mode 100644 sdk/python/feast/templates/local/.gitignore create mode 100644 sdk/python/feast/templates/minimal/.gitignore create mode 100644 sdk/python/feast/templates/postgres/.gitignore create mode 100644 sdk/python/feast/templates/snowflake/.gitignore create mode 100644 sdk/python/feast/templates/spark/.gitignore diff --git a/docs/getting-started/concepts/README.md b/docs/getting-started/concepts/README.md index a32c53b5f4..95e1a14bf1 100644 --- a/docs/getting-started/concepts/README.md +++ b/docs/getting-started/concepts/README.md @@ -4,6 +4,10 @@ [overview.md](overview.md) {% endcontent-ref %} +{% content-ref url="project.md" %} +[project.md](project.md) +{% endcontent-ref %} + {% content-ref url="data-ingestion.md" %} [data-ingestion.md](data-ingestion.md) {% endcontent-ref %} diff --git a/docs/getting-started/concepts/feature-view.md b/docs/getting-started/concepts/feature-view.md index ccb380497d..6ebe4feacf 100644 --- a/docs/getting-started/concepts/feature-view.md +++ b/docs/getting-started/concepts/feature-view.md @@ -14,7 +14,7 @@ Feature views consist of: * zero or more [entities](entity.md) * 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. * a name to uniquely identify this feature view in the project. -* (optional, but recommended) a schema specifying one or more [features](feature-view.md#feature) (without this, Feast will infer the schema by reading from the data source) +* (optional, but recommended) a schema specifying one or more [features](feature-view.md#field) (without this, Feast will infer the schema by reading from the data source) * (optional, but recommended) metadata (for example, description, or other free-form metadata via `tags`) * (optional) a TTL, which limits how far back Feast will look when generating historical datasets diff --git a/docs/getting-started/concepts/overview.md b/docs/getting-started/concepts/overview.md index ffbad86c03..f17db15170 100644 --- a/docs/getting-started/concepts/overview.md +++ b/docs/getting-started/concepts/overview.md @@ -2,11 +2,7 @@ ### Feast project structure -The top-level namespace within Feast is a **project**. Users define one or more [feature views](feature-view.md) within a project. Each feature view contains one or more [features](feature-view.md#feature). These features typically relate to one or more [entities](entity.md). A feature view must always have a [data source](data-ingestion.md), which in turn is used during the generation of training [datasets](feature-retrieval.md#dataset) and when materializing feature values into the online store. - -![](<../../.gitbook/assets/image (7).png>) - -**Projects** provide complete isolation of feature stores at the infrastructure level. This is accomplished through resource namespacing, e.g., prefixing table names with the associated project. Each project should be considered a completely separate universe of entities and features. It is not possible to retrieve features from multiple projects in a single request. We recommend having a single feature store and a single project per environment (`dev`, `staging`, `prod`). +The top-level namespace within Feast is a [project](project.md). ### Data ingestion diff --git a/docs/getting-started/concepts/project.md b/docs/getting-started/concepts/project.md new file mode 100644 index 0000000000..713e1410f6 --- /dev/null +++ b/docs/getting-started/concepts/project.md @@ -0,0 +1,19 @@ +# Project + +Projects provide complete isolation of feature stores at the infrastructure level. This is accomplished through resource namespacing, e.g., prefixing table names with the associated project. Each project should be considered a completely separate universe of entities and features. It is not possible to retrieve features from multiple projects in a single request. We recommend having a single feature store and a single project per environment (`dev`, `staging`, `prod`). + +![](<../../.gitbook/assets/image (7).png>) + +Users define one or more [feature views](feature-view.md) within a project. Each feature view contains one or more [features](feature-view.md#field). These features typically relate to one or more [entities](entity.md). A feature view must always have a [data source](data-ingestion.md), which in turn is used during the generation of training [datasets](feature-retrieval.md#dataset) and when materializing feature values into the online store. + +The concept of project provide the following benefits: + +**Logical Grouping**: Projects group related features together, making it easier to manage and track them. + +**Feature Definitions**: Within a project, you can define features, including their metadata, types, and sources. This helps standardize how features are created and consumed. + +**Isolation**: Projects provide a way to isolate different environments, such as development, testing, and production, ensuring that changes in one project do not affect others. + +**Collaboration**: By organizing features within projects, teams can collaborate more effectively, with clear boundaries around the features they are responsible for. + +**Access Control**: Projects can implement permissions, allowing different users or teams to access only the features relevant to their work. \ No newline at end of file diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index 4afd0086d9..76ba606f64 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -1,6 +1,23 @@ # Quickstart -In this tutorial we will +## What is Feast? + +Feast (Feature Store) is an open-source feature store designed to facilitate the management and serving of machine learning features in a way that supports both batch and real-time applications. + +For more info refer to [Introduction to feast](../README.md) + +## Prerequisites +* Ensure that you have Python (3.9 or above) installed. +* It is recommended to create and work in a virtual environment: + ```sh + # create & activate a virtual environment + python -m venv venv/ + source venv/bin/activate + ``` + +## Overview + +In this tutorial we will: 1. Deploy a local feature store with a **Parquet file offline store** and **Sqlite online store**. 2. Build a training dataset using our time series features from our **Parquet files**. @@ -9,7 +26,7 @@ In this tutorial we will 5. Read the latest features from the online store for real-time inference. 6. Explore the (experimental) Feast UI -## Overview +***Note*** - Feast can used as an executable or as a server, please refer to [feast feature server](../reference/feature-servers/python-feature-server.md) In this tutorial, we'll use Feast to generate training data and power online model inference for a ride-sharing driver satisfaction prediction model. Feast solves several common issues in this flow: @@ -279,7 +296,7 @@ There's an included `test_workflow.py` file which runs through a full sample wor 7. Verify online features are updated / fresher We'll walk through some snippets of code below and explain -### Step 3a: Register feature definitions and deploy your feature store +### Step 4: Register feature definitions and deploy your feature store The `apply` command scans python files in the current directory for feature view/entity definitions, registers the objects, and deploys infrastructure. In this example, it reads `example_repo.py` and sets up SQLite online store tables. Note that we had specified SQLite as the default online store by @@ -311,7 +328,7 @@ Created sqlite table my_project_driver_hourly_stats {% endtab %} {% endtabs %} -### Step 3b: Generating training data or powering batch scoring models +### Step 5: Generating training data or powering batch scoring models To train a model, we need features and labels. Often, this label data is stored separately (e.g. you have one table storing user survey results and another set of tables with feature values). Feast can help generate the features that map to these labels. @@ -466,7 +483,7 @@ print(training_df.head()) ``` {% endtab %} {% endtabs %} -### Step 3c: Ingest batch features into your online store +### Step 6: Ingest batch features into your online store We now serialize the latest values of features since the beginning of time to prepare for serving (note: `materialize-incremental` serializes all new features since the last `materialize` call). @@ -499,7 +516,7 @@ Materializing 2 feature views to 2024-04-19 10:59:58-04:00 into the sqlite onlin {% endtab %} {% endtabs %} -### Step 3d: Fetching feature vectors for inference +### Step 7: Fetching feature vectors for inference At inference time, we need to quickly read the latest feature values for different drivers (which otherwise might have existed only in batch sources) from the online feature store using `get_online_features()`. These feature @@ -544,7 +561,7 @@ pprint(feature_vector) {% endtab %} {% endtabs %} -### Step 3e: Using a feature service to fetch online features instead. +### Step 8: Using a feature service to fetch online features instead. You can also use feature services to manage multiple features, and decouple feature view definitions and the features needed by end applications. The feature store can also be used to fetch either online or historical @@ -594,7 +611,7 @@ pprint(feature_vector) {% endtab %} {% endtabs %} -## Step 4: Browse your features with the Web UI (experimental) +## Step 9: Browse your features with the Web UI (experimental) View all registered features, data sources, entities, and feature services with the Web UI. @@ -626,7 +643,7 @@ INFO: Uvicorn running on http://0.0.0.0:8888 (Press CTRL+C to quit) ![](../reference/ui.png) -## Step 5: Re-examine `test_workflow.py` +## Step 10: Re-examine `test_workflow.py` Take a look at `test_workflow.py` again. It showcases many sample flows on how to interact with Feast. You'll see these show up in the upcoming concepts + architecture + tutorial pages as well. diff --git a/sdk/python/feast/templates/athena/.gitignore b/sdk/python/feast/templates/athena/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/athena/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/aws/.gitignore b/sdk/python/feast/templates/aws/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/aws/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/cassandra/.gitignore b/sdk/python/feast/templates/cassandra/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/cassandra/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/cassandra/bootstrap.py b/sdk/python/feast/templates/cassandra/bootstrap.py index fa70917914..3338514114 100644 --- a/sdk/python/feast/templates/cassandra/bootstrap.py +++ b/sdk/python/feast/templates/cassandra/bootstrap.py @@ -275,7 +275,9 @@ def bootstrap(): # example_repo.py example_py_file = repo_path / "example_repo.py" - replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) + replace_str_in_file( + example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) + ) # store config yaml, interact with user and then customize file: settings = collect_cassandra_store_settings() diff --git a/sdk/python/feast/templates/gcp/.gitignore b/sdk/python/feast/templates/gcp/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/gcp/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/hazelcast/.gitignore b/sdk/python/feast/templates/hazelcast/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/hazelcast/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/hazelcast/bootstrap.py b/sdk/python/feast/templates/hazelcast/bootstrap.py index e5018e4fe0..7a2b49d249 100644 --- a/sdk/python/feast/templates/hazelcast/bootstrap.py +++ b/sdk/python/feast/templates/hazelcast/bootstrap.py @@ -165,7 +165,9 @@ def bootstrap(): # example_repo.py example_py_file = repo_path / "example_repo.py" - replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) + replace_str_in_file( + example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) + ) # store config yaml, interact with user and then customize file: settings = collect_hazelcast_online_store_settings() diff --git a/sdk/python/feast/templates/hbase/.gitignore b/sdk/python/feast/templates/hbase/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/hbase/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/hbase/bootstrap.py b/sdk/python/feast/templates/hbase/bootstrap.py index 125eb7c2e7..94be8e441d 100644 --- a/sdk/python/feast/templates/hbase/bootstrap.py +++ b/sdk/python/feast/templates/hbase/bootstrap.py @@ -23,7 +23,9 @@ def bootstrap(): driver_df.to_parquet(path=str(driver_stats_path), allow_truncated_timestamps=True) example_py_file = repo_path / "example_repo.py" - replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) + replace_str_in_file( + example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) + ) if __name__ == "__main__": diff --git a/sdk/python/feast/templates/local/.gitignore b/sdk/python/feast/templates/local/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/local/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/local/bootstrap.py b/sdk/python/feast/templates/local/bootstrap.py index e2c1efdbc4..9f6a5a6c96 100644 --- a/sdk/python/feast/templates/local/bootstrap.py +++ b/sdk/python/feast/templates/local/bootstrap.py @@ -25,8 +25,12 @@ def bootstrap(): example_py_file = repo_path / "example_repo.py" replace_str_in_file(example_py_file, "%PROJECT_NAME%", str(project_name)) - replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) - replace_str_in_file(example_py_file, "%LOGGING_PATH%", str(data_path)) + replace_str_in_file( + example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) + ) + replace_str_in_file( + example_py_file, "%LOGGING_PATH%", str(data_path.relative_to(repo_path)) + ) if __name__ == "__main__": diff --git a/sdk/python/feast/templates/minimal/.gitignore b/sdk/python/feast/templates/minimal/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/minimal/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/postgres/.gitignore b/sdk/python/feast/templates/postgres/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/postgres/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/snowflake/.gitignore b/sdk/python/feast/templates/snowflake/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/snowflake/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db diff --git a/sdk/python/feast/templates/spark/.gitignore b/sdk/python/feast/templates/spark/.gitignore new file mode 100644 index 0000000000..c47cbcd857 --- /dev/null +++ b/sdk/python/feast/templates/spark/.gitignore @@ -0,0 +1,44 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyo +*.pyd + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +*.egg-info/ +dist/ +build/ + +# Pytest +.cache +*.cover +*.log +.coverage +nosetests.xml +coverage.xml +*.hypothesis/ +*.pytest_cache/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IDEs and Editors +.vscode/ +.idea/ +*.swp +*.swo +*.sublime-workspace +*.sublime-project + +# OS generated files +.DS_Store +Thumbs.db From 49ec7a74cffa63eed843063fe67c8e9f04ed2561 Mon Sep 17 00:00:00 2001 From: Theodor Mihalache Date: Mon, 14 Oct 2024 10:34:51 -0400 Subject: [PATCH 2/4] fix: changes following issue 4593 - Reverted Fixed file path in templates to be relative path Signed-off-by: Theodor Mihalache --- sdk/python/feast/templates/cassandra/bootstrap.py | 4 +--- sdk/python/feast/templates/hazelcast/bootstrap.py | 4 +--- sdk/python/feast/templates/hbase/bootstrap.py | 4 +--- sdk/python/feast/templates/local/bootstrap.py | 8 ++------ 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/sdk/python/feast/templates/cassandra/bootstrap.py b/sdk/python/feast/templates/cassandra/bootstrap.py index 3338514114..fa70917914 100644 --- a/sdk/python/feast/templates/cassandra/bootstrap.py +++ b/sdk/python/feast/templates/cassandra/bootstrap.py @@ -275,9 +275,7 @@ def bootstrap(): # example_repo.py example_py_file = repo_path / "example_repo.py" - replace_str_in_file( - example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) - ) + replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) # store config yaml, interact with user and then customize file: settings = collect_cassandra_store_settings() diff --git a/sdk/python/feast/templates/hazelcast/bootstrap.py b/sdk/python/feast/templates/hazelcast/bootstrap.py index 7a2b49d249..e5018e4fe0 100644 --- a/sdk/python/feast/templates/hazelcast/bootstrap.py +++ b/sdk/python/feast/templates/hazelcast/bootstrap.py @@ -165,9 +165,7 @@ def bootstrap(): # example_repo.py example_py_file = repo_path / "example_repo.py" - replace_str_in_file( - example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) - ) + replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) # store config yaml, interact with user and then customize file: settings = collect_hazelcast_online_store_settings() diff --git a/sdk/python/feast/templates/hbase/bootstrap.py b/sdk/python/feast/templates/hbase/bootstrap.py index 94be8e441d..125eb7c2e7 100644 --- a/sdk/python/feast/templates/hbase/bootstrap.py +++ b/sdk/python/feast/templates/hbase/bootstrap.py @@ -23,9 +23,7 @@ def bootstrap(): driver_df.to_parquet(path=str(driver_stats_path), allow_truncated_timestamps=True) example_py_file = repo_path / "example_repo.py" - replace_str_in_file( - example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) - ) + replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) if __name__ == "__main__": diff --git a/sdk/python/feast/templates/local/bootstrap.py b/sdk/python/feast/templates/local/bootstrap.py index 9f6a5a6c96..e2c1efdbc4 100644 --- a/sdk/python/feast/templates/local/bootstrap.py +++ b/sdk/python/feast/templates/local/bootstrap.py @@ -25,12 +25,8 @@ def bootstrap(): example_py_file = repo_path / "example_repo.py" replace_str_in_file(example_py_file, "%PROJECT_NAME%", str(project_name)) - replace_str_in_file( - example_py_file, "%PARQUET_PATH%", str(driver_stats_path.relative_to(repo_path)) - ) - replace_str_in_file( - example_py_file, "%LOGGING_PATH%", str(data_path.relative_to(repo_path)) - ) + replace_str_in_file(example_py_file, "%PARQUET_PATH%", str(driver_stats_path)) + replace_str_in_file(example_py_file, "%LOGGING_PATH%", str(data_path)) if __name__ == "__main__": From f658b50ed84d445fed4290ee5aa5357093e499b7 Mon Sep 17 00:00:00 2001 From: Theodor Mihalache Date: Thu, 17 Oct 2024 15:27:43 -0400 Subject: [PATCH 3/4] docs: updated following review Signed-off-by: Theodor Mihalache --- docs/getting-started/concepts/overview.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/concepts/overview.md b/docs/getting-started/concepts/overview.md index f17db15170..033a80ad12 100644 --- a/docs/getting-started/concepts/overview.md +++ b/docs/getting-started/concepts/overview.md @@ -2,7 +2,8 @@ ### Feast project structure -The top-level namespace within Feast is a [project](project.md). +The top-level namespace within Feast is a **project**. Users define one or more [feature views](feature-view.md) within a project. Each feature view contains one or more [features](feature-view.md#feature). These features typically relate to one or more [entities](entity.md). A feature view must always have a [data source](data-ingestion.md), which in turn is used during the generation of training [datasets](feature-retrieval.md#dataset) and when materializing feature values into the online store. +You can read more about Feast projects in the [project page](project.md). ### Data ingestion From 7597fe60a34bfac222bea65e0df19ee9860acd5c Mon Sep 17 00:00:00 2001 From: Theodor Mihalache Date: Fri, 18 Oct 2024 18:51:46 -0400 Subject: [PATCH 4/4] Updated documents following review suggestions Added symlinks in all the templates pointing to the local template with the .gitignore file Signed-off-by: Theodor Mihalache --- docs/getting-started/concepts/project.md | 2 +- docs/getting-started/quickstart.md | 10 ++++- sdk/python/feast/templates/athena/.gitignore | 45 +------------------ sdk/python/feast/templates/aws/.gitignore | 45 +------------------ .../feast/templates/cassandra/.gitignore | 45 +------------------ sdk/python/feast/templates/gcp/.gitignore | 45 +------------------ .../feast/templates/hazelcast/.gitignore | 45 +------------------ sdk/python/feast/templates/hbase/.gitignore | 45 +------------------ sdk/python/feast/templates/local/.gitignore | 1 + sdk/python/feast/templates/minimal/.gitignore | 45 +------------------ .../feast/templates/postgres/.gitignore | 45 +------------------ .../feast/templates/snowflake/.gitignore | 45 +------------------ sdk/python/feast/templates/spark/.gitignore | 45 +------------------ 13 files changed, 21 insertions(+), 442 deletions(-) mode change 100644 => 120000 sdk/python/feast/templates/athena/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/aws/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/cassandra/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/gcp/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/hazelcast/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/hbase/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/minimal/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/postgres/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/snowflake/.gitignore mode change 100644 => 120000 sdk/python/feast/templates/spark/.gitignore diff --git a/docs/getting-started/concepts/project.md b/docs/getting-started/concepts/project.md index 713e1410f6..8a82db32b2 100644 --- a/docs/getting-started/concepts/project.md +++ b/docs/getting-started/concepts/project.md @@ -6,7 +6,7 @@ Projects provide complete isolation of feature stores at the infrastructure leve Users define one or more [feature views](feature-view.md) within a project. Each feature view contains one or more [features](feature-view.md#field). These features typically relate to one or more [entities](entity.md). A feature view must always have a [data source](data-ingestion.md), which in turn is used during the generation of training [datasets](feature-retrieval.md#dataset) and when materializing feature values into the online store. -The concept of project provide the following benefits: +The concept of a "project" provide the following benefits: **Logical Grouping**: Projects group related features together, making it easier to manage and track them. diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index 76ba606f64..ec101e5e81 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -4,6 +4,12 @@ Feast (Feature Store) is an open-source feature store designed to facilitate the management and serving of machine learning features in a way that supports both batch and real-time applications. +* *For Data Scientists*: Feast is a a tool where you can easily define, store, and retrieve your features for both model development and model deployment. By using Feast, you can focus on what you do best: build features that power your AI/ML models and maximize the value of your data. + +* *For MLOps Engineers*: Feast is a library that allows you to connect your existing infrastructure (e.g., online database, application server, microservice, analytical database, and orchestration tooling) that enables your Data Scientists to ship features for their models to production using a friendly SDK without having to be concerned with software engineering challenges that occur from serving real-time production systems. By using Feast, you can focus on maintaining a resilient system, instead of implementing features for Data Scientists. + +* *For Data Engineers*: Feast provides a centralized catalog for storing feature definitions allowing one to maintain a single source of truth for feature data. It provides the abstraction for reading and writing to many different types of offline and online data stores. Using either the provided python SDK or the feature server service, users can write data to the online and/or offline stores and then read that data out again in either low-latency online scenarios for model inference, or in batch scenarios for model training. + For more info refer to [Introduction to feast](../README.md) ## Prerequisites @@ -26,7 +32,9 @@ In this tutorial we will: 5. Read the latest features from the online store for real-time inference. 6. Explore the (experimental) Feast UI -***Note*** - Feast can used as an executable or as a server, please refer to [feast feature server](../reference/feature-servers/python-feature-server.md) +***Note*** - Feast provides a python SDK as well as an optional [hosted service](../reference/feature-servers/python-feature-server.md) for reading and writing feature data to the online and offline data stores. The latter might be useful when non-python languages are required. + +For this tutorial, we will be using the python SDK. In this tutorial, we'll use Feast to generate training data and power online model inference for a ride-sharing driver satisfaction prediction model. Feast solves several common issues in this flow: diff --git a/sdk/python/feast/templates/athena/.gitignore b/sdk/python/feast/templates/athena/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/athena/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/athena/.gitignore b/sdk/python/feast/templates/athena/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/athena/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/aws/.gitignore b/sdk/python/feast/templates/aws/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/aws/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/aws/.gitignore b/sdk/python/feast/templates/aws/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/aws/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/cassandra/.gitignore b/sdk/python/feast/templates/cassandra/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/cassandra/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/cassandra/.gitignore b/sdk/python/feast/templates/cassandra/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/cassandra/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/gcp/.gitignore b/sdk/python/feast/templates/gcp/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/gcp/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/gcp/.gitignore b/sdk/python/feast/templates/gcp/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/gcp/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/hazelcast/.gitignore b/sdk/python/feast/templates/hazelcast/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/hazelcast/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/hazelcast/.gitignore b/sdk/python/feast/templates/hazelcast/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/hazelcast/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/hbase/.gitignore b/sdk/python/feast/templates/hbase/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/hbase/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/hbase/.gitignore b/sdk/python/feast/templates/hbase/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/hbase/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/local/.gitignore b/sdk/python/feast/templates/local/.gitignore index c47cbcd857..e86277f60f 100644 --- a/sdk/python/feast/templates/local/.gitignore +++ b/sdk/python/feast/templates/local/.gitignore @@ -17,6 +17,7 @@ venv.bak/ *.egg-info/ dist/ build/ +.venv # Pytest .cache diff --git a/sdk/python/feast/templates/minimal/.gitignore b/sdk/python/feast/templates/minimal/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/minimal/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/minimal/.gitignore b/sdk/python/feast/templates/minimal/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/minimal/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/postgres/.gitignore b/sdk/python/feast/templates/postgres/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/postgres/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/postgres/.gitignore b/sdk/python/feast/templates/postgres/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/postgres/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/snowflake/.gitignore b/sdk/python/feast/templates/snowflake/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/snowflake/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/snowflake/.gitignore b/sdk/python/feast/templates/snowflake/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/snowflake/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file diff --git a/sdk/python/feast/templates/spark/.gitignore b/sdk/python/feast/templates/spark/.gitignore deleted file mode 100644 index c47cbcd857..0000000000 --- a/sdk/python/feast/templates/spark/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*.pyo -*.pyd - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -*.egg-info/ -dist/ -build/ - -# Pytest -.cache -*.cover -*.log -.coverage -nosetests.xml -coverage.xml -*.hypothesis/ -*.pytest_cache/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IDEs and Editors -.vscode/ -.idea/ -*.swp -*.swo -*.sublime-workspace -*.sublime-project - -# OS generated files -.DS_Store -Thumbs.db diff --git a/sdk/python/feast/templates/spark/.gitignore b/sdk/python/feast/templates/spark/.gitignore new file mode 120000 index 0000000000..4401ed4150 --- /dev/null +++ b/sdk/python/feast/templates/spark/.gitignore @@ -0,0 +1 @@ +../local/.gitignore \ No newline at end of file