docs(_framework_apis): say check_model is a deliberate no-op - #3012
Merged
Justin Chu (justinchuby) merged 2 commits intoAug 25, 2026
Merged
Conversation
The docstring read "Check the model." and the body read `del model # Unused yet`, which together suggest validation is pending implementation. It is not: the ONNX checker was deliberately removed because it can report false positives and adds export overhead, and the function is kept only for API compatibility. Records that rationale where a reader of the function will see it.
The docstring read "Check the model." and the body read `del model # Unused yet`, which together suggest validation is pending implementation. It is not: the ONNX checker was deliberately removed because it can report false positives and adds export overhead, and the function is kept only for API compatibility. Records that rationale where a reader of the function will see it.
Justin Chu (justinchuby)
approved these changes
Aug 25, 2026
Justin Chu (justinchuby)
enabled auto-merge (squash)
August 25, 2026 05:46
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3012 +/- ##
=======================================
Coverage 72.63% 72.63%
=======================================
Files 265 265
Lines 32218 32218
Branches 3044 3044
=======================================
Hits 23403 23403
Misses 7781 7781
Partials 1034 1034 ☔ View full report in Codecov by Harness. |
Justin Chu (justinchuby)
disabled auto-merge
August 25, 2026 14:59
Justin Chu (justinchuby)
merged commit Aug 25, 2026
0e4df17
into
microsoft:main
28 of 32 checks passed
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.
check_modelreads"""Check the model."""with a body ofdel model # Unused yet. Together those say validation is pending implementation. Per #2981 it is not: the checker was removed deliberately because it can report false positives and adds overhead to export, and the function is kept for API compatibility.This records that where someone reading the function will see it. No behaviour change; the body is still a no-op.
Wording is taken from Justin Chu (@justinchuby)'s explanation in #2981 rather than invented:
Refs #2981.
Checks
ruff format --checkreports the file already formatted.ruff checkunder the repo'spyproject.tomlreports the same single pre-existing finding before and after this change (TID251onimport pathlib, line 18, untouched here), so it introduces nothing new. I diffed the two rule-code sets rather than eyeballing the counts.I did not run the pytest suite: it needs a torch install this machine does not have. CI is the authority on that, and this change is a docstring and a comment.
Drafted with AI assistance. I read the function and its re-exports in
torch_2_6.pythroughtorch_2_11.pymyself and confirmedtorch_2_5.pyholds the only definition, so this is the only site that needed changing.