Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ where = ["src"]

[tool.setuptools.package-data]
"mobius.upstream_patches" = ["data/*/*/*.patch", "data/*/*/*.json", "data/*/*/*.md"]
"mobius.integrations.onnx_genai" = ["_schema/*.json"]

[tool.setuptools.dynamic]
version = { attr = "mobius.__version__" }
Expand Down
5 changes: 3 additions & 2 deletions src/mobius/integrations/onnx_genai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
:func:`write_audio_codec_workflow_metadata` emits typed codec SSA, while
:func:`write_tts_workflow_metadata` reports the current nested-loop induction
contract blocker precisely.
* **Diffusion pipelines** — :func:`write_diffusion_pipeline_metadata` emits an
iterative pipeline for a denoiser plus optional VAE / text encoder.
* **Diffusion pipelines** — :func:`write_diffusion_pipeline_metadata` emits a
typed SSA denoise loop for a denoiser plus VAE and optional text encoder,
shipping the sampler's solver/schedule components alongside it.

:func:`write_onnx_genai_config` is the unified entry point: it inspects the
built package and dispatches to the matching writer, so
Expand Down
30 changes: 30 additions & 0 deletions src/mobius/integrations/onnx_genai/_schema/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Vendored onnx-genai metadata schema

`inference_metadata.schema.json` is a verbatim copy of onnx-genai's published
`schema/inference_metadata.schema.json`, which that repo generates from its Rust
types (`crates/onnx-genai-metadata/src/schema/`).

**Why it is vendored.** The schema conformance tests used to look for a local
onnx-genai checkout and `pytest.skip` when they could not find one. CI has no
such checkout, so every one of those tests skipped there and the emitters were
only ever validated on the few developer machines that happened to have
onnx-genai cloned — and then only against whatever revision that clone sat on.
Two upstream contract redesigns (`pipeline` becoming a `PipelineSpec` whose only
property is `workflow`, and `speculative` becoming a `SpeculativeContract`) went
unnoticed for exactly that reason. Pinning the schema here makes the contract
mobius targets an explicit, reviewable file and makes drift a CI failure rather
than a silent skip.

**Updating it.** Copy the file from onnx-genai `main` and run the onnx-genai
tests in this package:

```bash
cp <onnx-genai>/schema/inference_metadata.schema.json \
src/mobius/integrations/onnx_genai/_schema/
python -m pytest src/mobius/integrations/onnx_genai/ -q
```

Set `ONNX_GENAI_SCHEMA=/path/to/inference_metadata.schema.json` to validate
against a different revision without editing this copy.

Synced from onnx-genai `10dfcd788` (2026-08-22).
Loading
Loading