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
cd data && cp ~/Downloads/archive.zip data && unzip archive.zip && cd - |
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
project: anomaly_feast_project | |
registry: data/registry.db | |
provider: local | |
online_store: | |
type: rockset | |
api_key: <YOUR_APIKEY> | |
host: <REGION_ENDPOINT_URL> |
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
cd anomaly_feast_project/feature_repo |
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
cd anomaly_feast_project/feature_repo |
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
feast init -t rockset anomaly_feast_project |
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
pip install feast | |
pip install rockset |
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
import gzip | |
import json | |
import openai | |
# Download the following file from https://cseweb.ucsd.edu/~jmcauley/datasets/amazon_v2/ | |
product_data_full = [] | |
for line in gzip.open('./amazon_metadata/meta_Video_Games.json.gz', 'rt', encoding='UTF-8'): | |
product_data_full.append(json.loads(line)) | |
# Remove products without descriptions and embed a subset of the data to save time (and money) |
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
import gzip | |
import json | |
import openai | |
# Download the following file from https://cseweb.ucsd.edu/~jmcauley/datasets/amazon_v2/ | |
product_data_full = [] | |
for line in gzip.open('./amazon_metadata/meta_Video_Games.json.gz', 'rt', encoding='UTF-8'): | |
product_data_full.append(json.loads(line)) | |
# Remove products without descriptions and embed a subset of the data to save time (and money) | |
product_data = [] | |
for item in range(12000): |
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
from feast import FeatureStore | |
from datetime import datetime | |
def run_server(): | |
store = FeatureStore(repo_path=".") | |
# Materialize all data within our ttl (50 hours) from the offline(parquet file) | |
# store to online store(Rockset). | |
store.materialize_incremental(end_date=datetime.utcnow()) | |
store.serve(host="127.0.0.1", port=6566, type_="http", no_access_log=True, no_feature_log=True) | |
if __name__ == "__main__": |
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
{ | |
"metadata": { | |
"feature_names": [ | |
"userId", | |
"processName", | |
"eventName", | |
"processId" | |
] | |
}, | |
"results": [ |