Feast plugin for IBM Cloud.
This plugin implements Feast's offline store backed using IBM Cloud Data Engine and IBM Cloud Object Storage
Installation
Project dependencies can be installed in a dedicated virtual environment by running the following command:
poetry install
Testing and Linting
poetry run pytest tests/
poetry run pylint ibm_data_engine
Test with Feast
You use it with Feast by defining your offline store and data sources. The instructions below illustrate how it can be used in feast-ibm-quickstart.
Define dependency
This library is currently not published in PyPI; you will have to
point to the repository directly. The easiest way to do it is to clone
the repository, and define the dependency as a path in feast-ibm-quickstart.
ibm-data-engine = { path = "/path/to/ibm-data-engine" }
After running poetry update, you should be able to use the IBM Cloud
Data Engine offline store.
Define data source
You can modify the src/feature_repo/example_repo.py file to use the new data
source. Below is the minimal example of the file:
from ibm_data_engine import DataEngineDataSource
driver_stats_source = DataEngineDataSource(
name="driver_hourly_stats_source",
table="driver_stats_demo",
timestamp_field="event_timestamp",
)
Define offline store
Then, feature_repo/feature_store.yaml must configure the offline store.
project: test_plugin
entity_key_serialization_version: 2
registry: data/registry.db
provider: local
online_store:
type: redis
connection_string: ${REDIS_HOST}:${REDIS_PORT},username=${REDIS_USERNAME},password=${REDIS_PASSWORD},ssl=true,ssl_ca_certs=${REDIS_CERT_PATH},db=0
offline_store:
type: ibm_data_engine.DataEngineOfflineStore
api_key: ${DATA_ENGINE_API_KEY}
instance_crn: ${DATA_ENGINE_INSTANCE_CRN}
target_cos_url: ${IBM_CLOUD_OBJECT_STORE_URL}
Notice that you must define the environment variables:
IBM_CLOUD_OBJECT_STORE_URLREDIS_HOSTREDIS_PORTREDIS_PASSWORDREDIS_CERT_PATHDATA_ENGINE_API_KEYDATA_ENGINE_INSTANCE_CRN
Apply
To apply the definitions to the registry, run:
poetry run feast -c ./feature_repo apply
Training
Run training by retrieving historical feature information from feature store
poetry run python training.py
Materialize
To materialize to Redis, run:
poetry run feast -c ./ materialize '<START_TIMESTAMP>' '<END_TIMESTAMP>'
Inference
poetry run python inference.py
Metadata
Release files for ibm-data-engine 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ibm_data_engine-0.4.0.tar.gz | 14.3 kB | Without provenance | Details for ibm_data_engine-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ibm_data_engine-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for ibm_data_engine-0.4.0-py3-none-any.whl |
Total release size: 29.1 kB
Release files / ibm_data_engine-0.4.0.tar.gz
| Download URL | ibm_data_engine-0.4.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
994a8b2c8a60bf0b1319eedf8b5d4b0a499a366417c4d98ebd5b2d3b24c422f8
|
|
BLAKE2b-256 checksum How to use checksums |
a19f1e7e81d229b403faa34fa6a26e0966fdbf97f8ea4582ba69ce7cc3210974
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.9.10-200.fc40.x86_64
|
Release files / ibm_data_engine-0.4.0-py3-none-any.whl
| Download URL | ibm_data_engine-0.4.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ed57a04efcb11cee041c46e10a74bc9d71e7a8e51de8f3eae89e24ca600a8f1
|
|
BLAKE2b-256 checksum How to use checksums |
d0866aa3078440be9cc10b30fbc1565c55841ecac3781b529ccaa6d98068812e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.9.10-200.fc40.x86_64
|
Security for ibm-data-engine 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.