Embedding extension to omop-graph
Project description
omop-emb
Embedding layer for OMOP CDM.
omop-emb now separates model metadata from embedding storage:
- model metadata is stored locally in SQLite (
metadata.db) - embedding vectors are stored by the selected backend (
pgvectororfaiss) - OMOP concept metadata remains in the OMOP CDM database
Installation
omop-emb now exposes backend-specific optional dependencies so installation
can match the embedding backend you actually intend to use.
pip install "omop-emb[pgvector]"
pip install "omop-emb[faiss]"
pip install "omop-emb[all]"
Notes:
pgvectorinstalls the PostgreSQL/pgvector dependencies.faissinstalls the FAISS-based backend dependencies. This currently only includes CPU supportallinstalls both backend stacks for development or mixed environments.- A plain
pip install omop-embinstalls the shared core package only. - PostgreSQL-specific embedding dependencies are optional, but
omop-embstill requires OMOP CDM database access. - Non-PostgreSQL database backends have not yet been tested.
Runtime Configuration
Common environment variables:
OMOP_EMB_BACKEND: backend name (pgvectororfaiss) used by the backend factory.OMOP_EMB_BASE_STORAGE_DIR: local base directory foromop-embartifacts, including local metadata (metadata.db) and FAISS files. If unset,omop-embdefaults to./.omop_embin the current working directory.OMOP_DATABASE_URL: SQLAlchemy URL for the OMOP CDM database.
Extended documentation can be found here.
Project Roadmap
- Interface for PostgreSQL storage of vectors
- Interface for FAISS storage of embeddings
- Extensive unit testing
- Backend testing
- Corruption and restoration of DB testing
- Support non-Flat indices for each backend
-
faissGPU support -
pgvectorscalesupport - Vector-quantisation for more efficient storage
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 omop_emb-0.3.3.tar.gz.
File metadata
- Download URL: omop_emb-0.3.3.tar.gz
- Upload date:
- Size: 206.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
822fa575e07bd6432f28e93d39608d75f4e3fddf28b30610c4932bdc9927c9b7
|
|
| MD5 |
5a5c67dd59b422277ace007f7880c341
|
|
| BLAKE2b-256 |
e3927dccdde085991b3439dd11a0f568f6c145bfdb4ae0e8bd5f18ebde939ade
|
File details
Details for the file omop_emb-0.3.3-py3-none-any.whl.
File metadata
- Download URL: omop_emb-0.3.3-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fc04d5e7efe003cbabb1e9a9d475f1e2fc79b482d1537d73103c316d933dc9a
|
|
| MD5 |
52b2c6533511c4ba95148e1995d4cb1e
|
|
| BLAKE2b-256 |
69b03681da27cf3e8f18bf7bc20a8f8ad053a126bad559fd434e1f0d6a8bc456
|