Skip to main content

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 (pgvector or faiss)
  • 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:

  • pgvector installs the PostgreSQL/pgvector dependencies.
  • faiss installs the FAISS-based backend dependencies. This currently only includes CPU support
  • all installs both backend stacks for development or mixed environments.
  • A plain pip install omop-emb installs the shared core package only.
  • PostgreSQL-specific embedding dependencies are optional, but omop-emb still requires OMOP CDM database access.
  • Non-PostgreSQL database backends have not yet been tested.

Runtime Configuration

Common environment variables:

  • OMOP_EMB_BACKEND: backend name (pgvector or faiss) used by the backend factory.
  • OMOP_EMB_BASE_STORAGE_DIR: local base directory for omop-emb artifacts, including local metadata (metadata.db) and FAISS files. If unset, omop-emb defaults to ./.omop_emb in 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
  • faiss GPU support
  • pgvectorscale support
  • Vector-quantisation for more efficient storage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omop_emb-0.3.2.tar.gz (204.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omop_emb-0.3.2-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file omop_emb-0.3.2.tar.gz.

File metadata

  • Download URL: omop_emb-0.3.2.tar.gz
  • Upload date:
  • Size: 204.8 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

Hashes for omop_emb-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9a8f2e5deac5db780c5b46f2f66e0c3630e50cfc5b456afb58272d566581fcfa
MD5 bd2b5ba1210eb0b46588119f59c843b9
BLAKE2b-256 570e7699e2b84e3a24628a0cd90bf4a6ab646870153d419c51a4f0f943123822

See more details on using hashes here.

File details

Details for the file omop_emb-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: omop_emb-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 42.4 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

Hashes for omop_emb-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3744b3306f0dd8cfcf7ba62f54b2e87a560f296965990c19129b6f779ff05b7a
MD5 cc11986fba687dd275e21bdc7ba29cd1
BLAKE2b-256 fbc0df1f933dee6debefe2c6a22d5754f87efae37627a134571a6f695eb97d37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page