Skip to content

Instantly share code, notes, and snippets.

cd data && cp ~/Downloads/archive.zip data && unzip archive.zip && cd -
project: anomaly_feast_project
registry: data/registry.db
provider: local
online_store:
type: rockset
api_key: <YOUR_APIKEY>
host: <REGION_ENDPOINT_URL>
cd anomaly_feast_project/feature_repo
cd anomaly_feast_project/feature_repo
feast init -t rockset anomaly_feast_project
pip install feast
pip install rockset
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)
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):
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__":
{
"metadata": {
"feature_names": [
"userId",
"processName",
"eventName",
"processId"
]
},
"results": [