Metadata-Version: 2.4
Name: umarise-mlflow
Version: 0.1.2
Summary: Anchor MLflow artifacts to Bitcoin. One line to production.
Author-email: Umarise <partners@umarise.com>
License-Expression: Unlicense
Project-URL: Homepage, https://umarise.com
Project-URL: Documentation, https://umarise.com/api-reference
Project-URL: Repository, https://github.com/AnchoringTrust/umarise-mlflow
Project-URL: Case Study, https://umarise.com/case/ai-code-generation
Keywords: umarise,mlflow,anchoring,bitcoin,proof-of-existence,opentimestamps,provenance,ai-audit
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security :: Cryptography
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: umarise-core-sdk>=1.1.0
Requires-Dist: mlflow>=2.0

# umarise-mlflow

Anchor every MLflow artifact at inception. One hash. Independent proof. Bitcoin-anchored.

## What it does

Every model, dataset, and artifact you log in MLflow gets a cryptographic fingerprint
anchored in Bitcoin via OpenTimestamps. Not after the fact. At the moment of creation.

The origin_id is logged back into your MLflow run. Verifiable by anyone.
Without trusting Umarise. Without an account. Forever.

## Install

pip install umarise-mlflow

## Usage

### Auto-anchor everything in a run

import mlflow
from umarise_mlflow import auto_anchor

with mlflow.start_run():
    with auto_anchor(api_key="um_..."):
        mlflow.log_artifact("model.pkl")
        mlflow.log_artifact("dataset.parquet")

Every artifact logged inside the context is automatically anchored.
The origin_id appears as a parameter in your MLflow run.

### Anchor a single artifact

from umarise_mlflow import anchor_artifact

result = anchor_artifact("model.pkl", api_key="um_...")
print(result["origin_id"])

### Anchor all artifacts in an existing run

from umarise_mlflow import anchor_run_artifacts

results = anchor_run_artifacts(run_id="abc123", api_key="um_...")

## What gets anchored

The SHA-256 hash of the file. Nothing else. The file never leaves your system.
Umarise receives only the fingerprint.

## What you get back

{
    "origin_id": "fb025c0e-...",
    "hash": "sha256:a1b2c3...",
    "captured_at": "2026-03-30T09:00:00Z",
    "proof_status": "pending"
}

proof_status moves from pending to anchored after Bitcoin confirmation.
Typically within 1-2 hours.

## Verify independently

Every anchor is verifiable without Umarise:

curl https://core.umarise.com/v1-core-proof?origin_id=fb025c0e-...

The returned .ots file verifies against Bitcoin directly using the
OpenTimestamps CLI. No account. No permission. No Umarise dependency.

## Why this exists

MLflow logs everything. Every log lives next to the thing it describes.
The timestamp comes from the same clock as the run. The audit trail is
written by the audited.

When a regulator, auditor, or counterparty asks "prove this model existed
before the incident" — MLflow alone cannot answer that.

umarise-mlflow gives MLflow the one thing it cannot give itself:
independently verifiable origin proof, anchored at inception.

## Get an API key

umarise.com/developers

## License

MIT
