support(transformer): add DigitalEdu tabular recipe#1198
Draft
kujin66 wants to merge 1 commit into
Draft
Conversation
kujin66
force-pushed
the
kujin66/add-snowflash-digitaledu-transformers-codegen
branch
from
July 24, 2026 03:38
60c6ef3 to
ce190c1
Compare
Contributor
Author
|
APPROVE (skill reviewer verdict) Reviewed PR #1198 against the
No requested changes. Leave the PR in draft state per skill workflow. |
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
Adds WinML support for
SnowFlash383935/DigitalEduTransformers, a remote-code tabular Transformer checkpoint. The change adds a tensor-in/tensor-out wrapper for the custommodel_type="transformer", registers thetabular-classificationtask boundary, and ships verified CPU fp32/fp16 recipes. Highest verified goal: L2 numeric comparison passes on CPU for fp32 and fp16; L3 eval is CLI-blocked becausewinml evalhas notabular-classificationevaluator today.Model metadata
What the model does: Binary tabular classification over seven numeric features, exposed by the model repository as custom Hugging Face code (
FleshkaTabularTransformer). Evidence: checkpoint config usesmodel_type="transformer",architectures=["FleshkaTabularTransformer"],input_dim=7, andpipeline_tag="tabular-classification".Primary user stories: Convert and run the trained tabular classifier through WinML/ONNX with a stable tensor contract instead of the model-card Python list API.
Supported tasks:
tabular-classificationin WinML, mapped to Optimum'stext-classificationexporter boundary after the wrapper exposesfeatures -> logits.Model architecture:
--trust-remote-codeconfig/build runs.Validation and support evidence
Baseline
Before this change,
winml config -m SnowFlash383935/DigitalEduTransformers --trust-remote-coderesolvedmodel_type="transformer"to an unsupported Optimum task and failed with no ONNX config. Explicit--task tabular-classification --trust-remote-codealso failed becausetabular-classificationwas not in the task boundary.After this change,
winml config -m SnowFlash383935/DigitalEduTransformers --task tabular-classification --trust-remote-code -o $OUTsucceeds and auto-detectsTabularTransformerWrapper, inputfeatures [1, 7] float32, outputlogits.Goal
Effort: L2, because this requires a new custom wrapper/export config plus a new WinML task family entry. Goal ceiling: L2 numeric comparison on CPU. Outcome: L2 support with CPU fp32/fp16 recipes.
Outcome
Shipped code paths:
src/winml/modelkit/models/hf/transformer.pysrc/winml/modelkit/models/hf/__init__.pysrc/winml/modelkit/loader/task.pysrc/winml/modelkit/inference/tasks.pysrc/winml/modelkit/models/winml/__init__.pytests/unit/models/test_tabular_transformer.pyShipped recipes:
examples/recipes/SnowFlash383935_DigitalEduTransformers/cpu/cpu/tabular-classification_fp32_config.jsonexamples/recipes/SnowFlash383935_DigitalEduTransformers/cpu/cpu/tabular-classification_fp16_config.jsonCoverage is partial by task level: CPU fp32/fp16 build, perf, and L2 numeric comparison pass; L3 task evaluation is CLI-blocked pending a
tabular-classificationevaluator.Per-EP/device/precision results
Task 'tabular-classification' is not supported by winml evalStructural checks: both artifacts load as ONNX IR 10 with input
features [1, 7]and outputlogits [1, 1]. fp16 build reportsModel Precision: fp16and final artifact size is 192.6 MB vs 385.0 MB fp32.Quality gates:
python -m pytest tests/unit/models/test_tabular_transformer.py tests/unit/loader/test_known_tasks.py tests/unit/inference/test_tasks.py --tb=short --no-cov -p no:cacheprovider: 67 passed.uv run ruff check src/ tests/: All checks passed.uv run mypy -p winml.modelkit: Success, no issues found in 411 source files.Delta
The baseline could not emit a usable tabular recipe, so the PR adds the minimal class-wide support needed for this generic custom
transformertabular pattern:tabular-classificationas a WinML task and maps it to Optimumtext-classificationonly at the exporter boundary.TabularTransformerWrapper, exposing tensorfeaturesinput andlogitsoutput while reusing the remote model's trained submodules and config normalization statistics.featuresshape[1, 7], outputlogits, andtrust_remote_code: true.examples/recipes/README.mdremains untouched.Analyze summary
Static rule analysis completed for fp32 and fp16 with
--ep all; this is compatibility analysis, not runtime execution.Component-level summary:
Op-level summary:
Reproduce commands
--trust-remote-codeis required for this checkpoint because Hugging Face must load customauto_mapcode from the model repository.