Context
_select_model_loader() in src/winml/modelkit/eval/evaluate.py selects several distinct loading contracts, but _ModelLoaderKind does not document what each kind means or who owns model/session construction.
Mask generation currently selects EVALUATOR_MANAGED: WinMLMaskGenerationEvaluator constructs its encoder and decoder ONNX Runtime sessions directly. This bypasses WinMLAutoModel because the composite model type is not registered. That makes the loading design task-specific and difficult to reuse for future evaluators backed by composite models.
Work
Acceptance criteria
- Loader-kind semantics and precedence are clear at their declaration.
- Mask-generation session ownership is either moved into a reusable composite model abstraction or the remaining blocker is explicitly documented.
- The design does not hardcode model architecture, graph node, tensor, or layer names in shared loading code.
- Existing ONNX, ONNX-to-HF comparison, ONNX-to-ONNX comparison, and GenAI loading behavior remains unchanged.
Context
_select_model_loader()insrc/winml/modelkit/eval/evaluate.pyselects several distinct loading contracts, but_ModelLoaderKinddoes not document what each kind means or who owns model/session construction.Mask generation currently selects
EVALUATOR_MANAGED:WinMLMaskGenerationEvaluatorconstructs its encoder and decoder ONNX Runtime sessions directly. This bypassesWinMLAutoModelbecause the composite model type is not registered. That makes the loading design task-specific and difficult to reuse for future evaluators backed by composite models.Work
_ModelLoaderKindvalue, including its input form, loading owner, returned model shape, build-pipeline behavior, and intended evaluation mode.WinMLCompositeModel/WinMLAutoModel._select_model_loader().Acceptance criteria