Similarity engine utils
Project description
similarity-engine-utils
Utility tools for easier management of feature-vector database and similar vector comparison
Installation
Use the package manager pip to install library.
pip install similarity-engine-utils
Initialize feature group
bucket_name = '{bucket_for_feature_store}'
s3_folder = '{folder_for_feature_store}'
featuregroup_name = '{my_feature_name}_{commit_id}'
feature_group_name = f'{my_feature_name}/commit_id={featuregroup_name}'
feature_group = FeatureGroup(
name=featuregroup_name,
boto3_session = boto3_session,
s3_uri=f"s3://{bucket_name}/{s3_folder}"
)
Create feature group
def create_feature_group(feature_group):
description="What is my feature group about"
feature_script_repo="{repo_link_to_script}"
data_source="{what data are used}"
record_identifier_feature_name = "column name to store id"
event_time_feature_name = "{column name to store timestamp}"
partition_columns=['biz_id','customer_id']
feature_definitions=[
FeatureDefinition(feature_name="column_name1", feature_type=FeatureTypeEnum.INTEGRAL),
FeatureDefinition(feature_name="column_name2", feature_type=FeatureTypeEnum.STRING),
]
feature_group.create(
record_identifier_name=record_identifier_feature_name,
event_time_feature_name=event_time_feature_name,
feature_script_repo=feature_script_repo,
partition_columns=partition_columns,
data_source=data_source,
description=description,
file_format='parquet/json',
feature_definitions=feature_definitions
)
return feature_group
if feature_group.exists() is None:
feature_group = create_feature_group(feature_group)
Ingest data
import pandas as pd
data = pd.read_json('data.json')
feature_group.ingest_data_frame(data,f"mlfow_parent_run_id={parent_run_id}/{filename_without_extention}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file similarity-engine-utils-0.0.5.tar.gz.
File metadata
- Download URL: similarity-engine-utils-0.0.5.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5074b5aa5a074e5bb982b120ba4b6de925cce67ba167f3120c3b7acc63011485
|
|
| MD5 |
30237111d74e78a607a7557dbc022e00
|
|
| BLAKE2b-256 |
65bba16a69337149702661c6372d0491969c8d6c299c06810d5ea8e7590e1dd7
|
File details
Details for the file similarity_engine_utils-0.0.5-py3-none-any.whl.
File metadata
- Download URL: similarity_engine_utils-0.0.5-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c6da14513eba5bef1d99607f73f13bfb612886312343ed21bc4002f35863e2a
|
|
| MD5 |
3c722b1a6a615375138fd65a7a31246e
|
|
| BLAKE2b-256 |
58a43292e01f85eec203f32b6eb93fca7b5f0251c1ebbae183797564db8cdcab
|