Skip to content

refactor: introduce WinMLManifest class and rename to winml_manifest.json#1057

Open
xieofxie wants to merge 9 commits into
mainfrom
hualxie/winmlcli_manifest
Open

refactor: introduce WinMLManifest class and rename to winml_manifest.json#1057
xieofxie wants to merge 9 commits into
mainfrom
hualxie/winmlcli_manifest

Conversation

@xieofxie

@xieofxie xieofxie commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames build_manifest.jsonwinml_manifest.json to align with the existing winml_build_config.json naming convention, introduces a WinMLManifest dataclass as the single source of truth for the manifest schema, and wires winml export to also generate the manifest.

Changes

New: utils/manifest.py

  • ManifestStage — dataclass for one pipeline stage entry (name, status, filename, timing, optional quant metrics).
  • WinMLManifest — full manifest dataclass with:
    • to_dict() / save() for serialisation (drops None fields, injects schema_version)
    • load() / from_dict() for deserialisation (forward-compatible — unknown keys land in extras)
    • find(directory) to discover all *winml_manifest.json in a directory
    • manifest_path_for(output_dir, prefix) for canonical path computation

Producers wired to WinMLManifest

Producer Before After
build/hf.py raw dictjson.dumps WinMLManifest.save()
build/onnx.py raw dictjson.dumps WinMLManifest.save()
commands/export.py (no manifest) WinMLManifest.save()

Filename rename

All references to build_manifest.json updated to winml_manifest.json across source, tests, and docs (15 files).

Export now generates manifest

winml export writes winml_manifest.json alongside the exported ONNX with source: "export", stage timing, and HTPExporter stats. Composite exports get per-component prefixed manifests (e.g. model_decoder_winml_manifest.json).

Notes

  • Consumers (inference/engine.py, inspect/resolver.py, serve/app.py) still read raw dicts via json.loads — they can adopt WinMLManifest.load() / .from_dict() incrementally.
  • The on-disk JSON format is backward-compatible: same schema_version: 1, same field names.

@xieofxie xieofxie requested a review from a team as a code owner July 6, 2026 06:55
Comment thread tests/unit/utils/test_manifest.py Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants