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 Falsify OÜ.

Metadata

Release files for mlflow-falsify 0.4.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.4.0
File Size Uploaded Provenance Actions
mlflow_falsify-0.4.0.tar.gz 16.4 kB With provenance Details for mlflow_falsify-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 28.7 kB

Release files / mlflow_falsify-0.4.0.tar.gz

Download URL mlflow_falsify-0.4.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6bacb87998f13d801f60dc30ee59b4c77fa558bb48d5b50c3c879593053bc7e1
BLAKE2b-256 checksum
How to use checksums
e02a582430d81844aeee478ad6894fedd7e9dda581e8167cdc5fb12ce0a5cbeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

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

Download URL mlflow_falsify-0.4.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d793e913d3265e7391aaf96f79451b70277006da9dbbabde89d5aadf9ce676b4
BLAKE2b-256 checksum
How to use checksums
72cdbe9b12045410ccb3f58515e6b7c3f9ff318ccf77d9019eaf7193685590d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Security for mlflow-falsify 0.4.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mlflow_falsify-0.4.0.tar.gz

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 Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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