Artifact Publishing¶
This page is maintainer-facing. Generated ONNX models are build outputs, not
source documentation. The public docs may point at hosted sample models, but the
models themselves are not part of the jax2onnx source tree.
Policy¶
- Do not commit
.onnxor.onnx.datafiles, including files underdocs/onnx/. - Keep generated models local while developing and validating.
- Public docs may link to stable hosted sample models through generated Netron URLs.
- Do not describe upload mechanics, credentials, or release-local promotion checklists in user-facing docs.
Public Links¶
The generated reference tables use Netron links whose model URLs point at the
hosted sample-model repository. The current base URL lives in
scripts/generate_readme.py as NETRON_BASE_URL:
When publishing or replacing a sample model, keep the hosted path aligned with
the generated testcase path. Generated tests write local models under
onnx/<context>/<testcase>.onnx, where dots in the testcase context become path
separators. scripts/generate_readme.py builds the public link from the same
<context>/<testcase>.onnx suffix.
Examples:
External Data Sidecars¶
to_onnx(..., output_path=...) serializes ONNX protobufs with external-data
support. Initializers above the configured threshold may produce a sidecar named
<model>.onnx.data next to the .onnx file. If that sidecar exists, the hosted
sample is incomplete unless both files are present at matching relative paths.
Before publishing a model, inspect the local output directory:
The helper scripts/sync_onnx_models.sh targets the sibling sample-model repo
and currently copies only .onnx files. Use it only for models that do not need
external sidecars, or make sure matching .onnx.data files are present in the
sample-model repo before relying on the public Netron link.
Validation Before Publishing¶
- Generate the model locally from the matching plugin/example test.
- Run the focused pytest target that validates the export.
- Check whether the export produced a matching
.onnx.datasidecar. - Open the local model in Netron when graph readability or external data placement changed.
- Publish the
.onnxand matching.onnx.datafile together when external data is used. - Verify the hosted Netron URL after publishing.
- Regenerate the public reference page if testcase names, contexts, or support status changed.
After publishing, run poetry run mkdocs build --strict to catch broken local
links or navigation issues.