Skip to main content

mlflow-falsify — automatic PRML manifest hash tagging for MLflow runs

PyPI version Python versions License: MIT DOI Spec: PRML v0.1

Drop a PRML manifest in your repo. Every MLflow run gets cryptographically bound to it. No workflow changes.

Install

pip install mlflow-falsify

The plugin is discovered automatically through MLflow's mlflow.run_context_provider entry point.

Usage

import mlflow

# .prml.yaml exists in CWD or any parent directory — that's all you need.
with mlflow.start_run():
    mlflow.log_metric("accuracy", 0.873)
    # The run now carries prml.manifest_hash and friends as tags.

Verify the locked predicate at run end (0.3.0+)

Tagging proves which bar the run was bound to; locked_run also checks it:

import mlflow, mlflow_falsify

with mlflow_falsify.locked_run():
    mlflow.log_metric("accuracy", 0.91)
# run is now tagged:
#   prml.verdict  = PASS | FAIL | UNVERIFIED | TAMPERED
#   prml.observed = 0.91

TAMPERED means the manifest changed between run start and verification — the goalpost moved mid-run. Post-hoc: mlflow_falsify.verify_run(run_id). Set MLFLOW_FALSIFY_STRICT=1 to raise on FAIL/TAMPERED in CI.

What gets tagged

When a .prml.yaml or prml.yaml is found in the current directory or any ancestor, every run is tagged with:

  • prml.manifest_hash — SHA-256 of the canonical manifest bytes (PRML v0.1 §3)
  • prml.manifest_path — relative path to the discovered manifest
  • prml.version — manifest schema version (e.g. prml/0.1)
  • prml.metric — the pre-registered metric (e.g. accuracy)
  • prml.comparator — one of >=, >, ==, <=, <
  • prml.threshold — the numeric threshold, as a string
  • prml.dataset_id — the pre-registered dataset identifier

Missing or malformed fields are silently skipped. The provider never raises into your run.

HPO sweeps and tag scope

In an HPO sweep the same PRML claim repeats across thousands of runs, so emitting the 5 descriptive tags per-run becomes pure tag noise. As of v0.2.0 the plugin supports lifting them to experiment level:

export MLFLOW_FALSIFY_TAG_SCOPE=experiment
import mlflow_falsify

mlflow.set_experiment("credit-scorer-hpo")
mlflow_falsify.tag_experiment()  # idempotent; sets metric/comparator/threshold/dataset_id/version once

for params in hpo_grid:
    with mlflow.start_run():
        ...  # only prml.manifest_hash and prml.manifest_path attach per-run

Default behaviour (MLFLOW_FALSIFY_TAG_SCOPE=run or unset) is unchanged: all 7 tags attach per-run, backward-compatible with v0.1.x.

Why this matters

  • EU AI Act Article 12 evidence layer. Every logged run carries a tamper-evident pointer to the claim it was meant to test.
  • Eval reproducibility by default. The hash freezes metric, threshold, dataset, and seed before the experiment runs.
  • Audit trails for free. Reviewers can recompute the manifest hash from the YAML and compare it against your tracked runs.
  • No workflow change. Existing MLflow code is untouched — the plugin attaches via entry points.

Audit & compliance crosswalks

Where the manifest hash this plugin attaches fits in major AI governance frameworks (FULL / PARTIAL / NONE tagged):

License

MIT. Copyright 2026 Cüneyt Öztürk.

Metadata

Release files for mlflow-falsify 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlflow-falsify 0.3.0
File Size Uploaded
mlflow_falsify-0.3.0.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mlflow-falsify 0.3.0
File Interpreter ABI Platform
mlflow_falsify-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / mlflow_falsify-0.3.0.tar.gz

Download URL mlflow_falsify-0.3.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8ce5de3715c48b450904bb5cdb18dc395cf04be4d09bfc0394739ac0a1b4933b
BLAKE2b-256 checksum
How to use checksums
e6928170561cce766a59263b411ded30948aea9368a3046e19b20115ac6f1595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / mlflow_falsify-0.3.0-py3-none-any.whl

Download URL mlflow_falsify-0.3.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c69b738367782b0fb5ceedb842401ab7c84de7a01c1c1fd1d56e51b3f1e2cce0
BLAKE2b-256 checksum
How to use checksums
154cc9fe627f68fa45d873dd354bc4d2b217f22fa3c75a24427f7140b5c5ab1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page