MLflow × NeoMundi
Measure the model calls MLflow already traces, and find each measurement on the MLflow trace. One function next to your own span processors, the latency MLflow recorded, and only token counts the provider published.
Quickstart · What it refuses to do · Notebook · Limitations · Cost
Evidence level: E2. Four real model calls traced by the real
mlflow.openai.autolog()against a local Ollama's OpenAI-compatible/v1were measured on the service verification account on 2026-11-26 and re-read from the API as persisted: 4/4, servedmeasurement_version3.5.0, 0.12 CHF. Two more phases were refused on real spans and billed nothing: a stream without usage, and a span carrying a count of unknown origin. Proof:evidence/e2_qualification_20261126T165539Z.json. See LIMITATIONS.md §8.
What this is
NeoMundiMlflowProcessor registers one function with MLflow's public
hook, mlflow.tracing.configure(span_processors=[...]). It is appended
to the processors you already have, and MLflow calls it for every span it
ends. For each model call written by MLflow's openai autolog it takes
three things:
- the token count, as the provider's own
total_tokens, copied by MLflow intomlflow.chat.tokenUsage; - the latency, as the span's
end_time_ns - start_time_nsthat MLflow recorded; - the served model.
It then submits to NeoMundi's POST /v1/govern through the neomundi SDK,
on a worker thread, so your call never waits for it. Afterwards it writes
the NeoMundi request_id and measurement_version back on the MLflow
trace as tags. You can open the trace in the MLflow UI and find the
observation that measured it.
Every other span gets an outcome too, with a named status. Agent, chain, workflow and task spans are aggregates. Tools, retrievers and embeddings are not model calls. A count written by any other instrumentation is unverified.
What it is not
- Not a measurement of every MLflow autolog. MLflow stores token counts from many writers under one attribute, and some of them are not the provider's. We measured three cases where the provider published nothing: the Agents SDK tracer writes
0/0/0, LiteLLM's MLflow logger writes its own estimate (14/7/21), and LangChain copies whatever the chat model computed. Only theopenaiautolog was shown to copy the provider's usage verbatim and to leave it absent when there is none (LIMITATIONS §1). - Not an OpenTelemetry processor. A processor added to MLflow's tracer provider is silently dropped on the next
mlflow.set_experiment(). This uses MLflow's own public hook instead (§2). - Not a reader of the trace-level aggregate. MLflow's trace total sums calls that are measured one by one.
- Not a tracer, evaluator or truth checker. Every submission is a billed measurement. NeoMundi verifies integrity and authenticity, not whether an answer was true.
Install
Not on PyPI yet, so pip install mlflow-neomundi does not work. Install
from the repository:
pip install 'git+https://github.com/neomundi-io/neomundi-integrations.git#subdirectory=integrations/mlflow'
Python ≥ 3.11. Depends on mlflow-tracing>=3.18.0,<3.19, the light
package a full mlflow already includes, and on neomundi>=2.1.0,<3.0.
MLflow needs a store to trace at all: with mlflow-tracing alone and no
tracking URI, it records no span (§5).
Quickstart
import os
import mlflow
from mlflow_neomundi import NeoMundiMlflowProcessor
mlflow.set_tracking_uri("http://localhost:5000") # first: a new URI resets MLflow's hooks
mlflow.openai.autolog()
processor = NeoMundiMlflowProcessor(
api_key=os.environ["NEOMUNDI_API_KEY"],
base_url="https://api.neomundi.io",
).install()
reply = client.chat.completions.create(model="gpt-4o-mini", messages=[...])
processor.flush() # submissions run off your call's path
for o in processor.outcomes:
print(o.span_type, o.status, o.token_count, o.latency_ms, o.request_id)
print(processor.installed) # is MLflow still calling it?
Free first: NeoMundiMlflowProcessor(submit=False).install() needs no
key, opens no socket, and runs every check. It shows, on your own traffic,
which calls would be measured and which would be refused, and why.
Refusals
Each status is a constant exported by the package. Every refusal submits nothing.
| Status | When |
|---|---|
not_submitted_unverified_token_count |
the span was written by something other than MLflow's openai autolog: the Agents SDK tracer, LangChain, LiteLLM's logger, a hand-written span |
not_submitted_no_token_count |
the provider published no usage, so the attribute is absent and stays absent |
not_submitted_invalid_token_count |
usage without a positive integer total_tokens (partial, null, zero); never rebuilt |
not_submitted_aggregate_span |
AGENT, CHAIN, WORKFLOW, TASK: they contain calls already measured |
not_submitted_not_a_model_call |
TOOL, RETRIEVER, RERANKER, EMBEDDING, GUARDRAIL, PARSER, MEMORY, EVALUATOR |
not_submitted_unsupported_span |
UNKNOWN, or a span type this release does not know |
not_submitted_application_error |
the model call failed (span status ERROR) |
not_submitted_no_latency |
no usable start and end time |
skipped_sampling |
excluded by sample_rate |
not_submitted_local_only |
submit=False |
not_submitted_transport_error |
the NeoMundi API was unreachable or refused; your call is untouched |
not_submitted_queue_full, not_submitted_processor_closed, not_submitted_internal_error |
the processor protected your application |
Outcomes never carry the prompt, the response or a key. They carry only
counts, names and identifiers. examples/02_refusals.py
shows each refusal on a real MLflow span.
What it costs
🔴 Every submitted observation is a billed measurement (0.030 CHF on
TIER_03). One observation per measured model call. Aggregate spans are
never billed, so an agent run under mlflow.openai.autolog() is not
counted twice. sample_rate (default 1.0) is deterministic in the span
id. Kill switch: processor.sample_rate = 0.0, immediate. Installing a
second processor retires the first, so re-running a notebook cell does not
bill twice.
Honest status
| Offline test suite | 75 tests, green on Python 3.12 / Linux locally; CI runs 3.11–3.13 on Linux, macOS, Windows |
| Real execution | E2: 4 observations submitted to https://api.neomundi.io, 4/4 re-read as persisted (2026-11-26, Python 3.12, neomundi 2.1.0). See evidence/ |
| Maturity | beta |
Read LIMITATIONS.md before drawing a conclusion from any score.
License
Apache-2.0. See LICENSE.
Metadata
Release files for mlflow-neomundi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mlflow_neomundi-0.1.0.tar.gz | 27.5 kB | With provenance | Details for mlflow_neomundi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlflow_neomundi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mlflow_neomundi-0.1.0-py3-none-any.whl |
Total release size: 43.7 kB
Release files / mlflow_neomundi-0.1.0.tar.gz
| Download URL | mlflow_neomundi-0.1.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3f38f9517f3110fd82c7bdc4f59bfe7d2a3eccb2d7baa16c98a234582457f7b
|
|
BLAKE2b-256 checksum How to use checksums |
4ac3f46f95e264b8b405c4607df08851e8a32fd5bf79e5b7db014cb71ef90787
|
| 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 26, 2026.
Transparency logRelease files / mlflow_neomundi-0.1.0-py3-none-any.whl
| Download URL | mlflow_neomundi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ae1604c0ae8a342410cf0112555c91ebe54454b893f3ebb3938b4f32fc0cdc8
|
|
BLAKE2b-256 checksum How to use checksums |
7677de6ff5830b31b5b67b4b1ff8723bc254faeb93357ea2aaec70cf321a7aa2
|
| 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 26, 2026.
Transparency logSecurity for mlflow-neomundi 0.1.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.
Attestation for mlflow_neomundi-0.1.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 26, 2026.
Transparency logA 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.