Skip to main content

AI Assurance Platform - Monitor, Explain, Govern every AI system in production

Project description

Vectora Python SDK

Vectora helps you monitor sklearn models in production without adding latency to your prediction path.

The SDK captures:

  • prediction metrics like accuracy, F1, precision, and recall
  • feature distribution summaries for drift detection
  • SHAP-based feature importance when shap is available
  • trace IDs that connect predictions back to the Vectora dashboard

Install

pip install vectora

Quickstart

from vectora import VectoraClient
from vectora.models import SklearnConnector

client = VectoraClient(api_key="vct_live_xxx")
connector = SklearnConnector(
    client=client,
    model=your_sklearn_model,
    model_id="11111111-1111-1111-1111-111111111111",
)

predictions = connector.predict(X_test, y_true=y_test)

predict() returns the model's predictions immediately. Vectora sends the monitoring payload in a background thread so your production inference path stays fast.

What gets sent

Each prediction call sends a payload to /api/ingest/metrics with:

  • trace_id
  • model_id
  • metrics
  • feature_distributions
  • shap_values
  • sample_count
  • timestamp

If SHAP is not installed, the SDK logs a warning once and continues without SHAP values.

If the network call fails, the SDK logs the error to stderr and never raises it back to your prediction path.

API

VectoraClient

client = VectoraClient(
    api_key="vct_live_xxx",
    base_url="https://vectora.ai",
    timeout=5.0,
    max_retries=2,
)

SklearnConnector

connector = SklearnConnector(client, model_id="11111111-1111-1111-1111-111111111111", model=trained_model)
predictions = connector.predict(X, y_true=y_true)

Coming Soon

vectora.llm and vectora.agent are reserved for future releases and raise ComingSoonError when accessed.

Release

Tagging the repository with v* triggers the GitHub Actions publish workflow in .github/workflows/publish.yml.

git tag v0.1.0
git push origin v0.1.0

The workflow:

  • runs the SDK test suite
  • builds the source and wheel distributions
  • publishes to PyPI using GitHub Actions trusted publishing

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

vectora-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

vectora-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file vectora-0.1.0.tar.gz.

File metadata

  • Download URL: vectora-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectora-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d3d311f6b2a143d616d1f3c7f5a557e92c9e9bd3a22e6934b79bfe5ed0fc104
MD5 7e3dc486ebce7c0e39a0be7b0d561619
BLAKE2b-256 75148a7aae51ef56117ad366090e533e5444f3f001216fdbabcefd3ea9796de9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectora-0.1.0.tar.gz:

Publisher: publish.yml on vectora-dev/vectora-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vectora-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vectora-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectora-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2e6109234808e90ae9fa1c82d2fea3dd6d8adea9269d647c6f99c1ff8dbe12
MD5 f9d893e573482f405e9a32bce8a80900
BLAKE2b-256 d5c646f7f8e27479d53f19ff6598a2c199263183e373a83bfbcf6e26298a9671

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectora-0.1.0-py3-none-any.whl:

Publisher: publish.yml on vectora-dev/vectora-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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