refactor: introduce WinMLManifest class and rename to winml_manifest.json#1057
Open
xieofxie wants to merge 9 commits into
Open
refactor: introduce WinMLManifest class and rename to winml_manifest.json#1057xieofxie wants to merge 9 commits into
xieofxie wants to merge 9 commits into
Conversation
…, add cleanup + tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames
build_manifest.json→winml_manifest.jsonto align with the existingwinml_build_config.jsonnaming convention, introduces aWinMLManifestdataclass as the single source of truth for the manifest schema, and wireswinml exportto also generate the manifest.Changes
New:
utils/manifest.pyManifestStage— dataclass for one pipeline stage entry (name, status, filename, timing, optional quant metrics).WinMLManifest— full manifest dataclass with:to_dict()/save()for serialisation (dropsNonefields, injectsschema_version)load()/from_dict()for deserialisation (forward-compatible — unknown keys land inextras)find(directory)to discover all*winml_manifest.jsonin a directorymanifest_path_for(output_dir, prefix)for canonical path computationProducers wired to
WinMLManifestbuild/hf.pydict→json.dumpsWinMLManifest→.save()build/onnx.pydict→json.dumpsWinMLManifest→.save()commands/export.pyWinMLManifest→.save()Filename rename
All references to
build_manifest.jsonupdated towinml_manifest.jsonacross source, tests, and docs (15 files).Export now generates manifest
winml exportwriteswinml_manifest.jsonalongside the exported ONNX withsource: "export", stage timing, and HTPExporter stats. Composite exports get per-component prefixed manifests (e.g.model_decoder_winml_manifest.json).Notes
inference/engine.py,inspect/resolver.py,serve/app.py) still read raw dicts viajson.loads— they can adoptWinMLManifest.load()/.from_dict()incrementally.schema_version: 1, same field names.