Repository navigation
Conversation
Follow-up to Project-MONAI#9145. The topology-cache tests added there pin the snapshot mechanism -- that `_node_a_py` / `_arch_code_a_py` agree with their source tensors and that eager still honours mutations -- but nothing asserts the outcome Project-MONAI#9144 is actually about: that a deployed DiNTS traces into a single graph. A refactor that branched on the tensors again would keep those tests green while reintroducing all 13 breaks. Assert `torch._dynamo.explain` reports (1 graph, 0 breaks) on the grid from the issue. The same grid reports (14, 13) with `dints.py` from a7904ae^. Signed-off-by: Patel, Nilaykumar K <NilaykumarKantibhai.Patel@amd.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds a Dynamo regression test for DiNTS. When Dynamo is supported, the test traces an evaluation-mode CPU model and asserts one graph and zero graph breaks. It suppresses trace logging during the test and restores the previous logger level afterward. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: ⚪ Minimal · up to The added test covers the reported DiNTS graph-break regression. No material merge-blocking risk is evident from the supplied change. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #9159 .
Description
Follow-up to #9145, which fixed the DiNTS graph breaks from #9144 but added no test for that condition.
Adds
TestDintsGraphBreakstotests/networks/nets/test_dints_network.py: builds the grid from the issue, runs torch._dynamo.explain, asserts(graph_count, graph_break_count) == (1, 0)`.Guarded by
torch._dynamo.is_dynamo_supported()rather than a version check —(1, 0)verified on 2.8.0+cpu (thepyproject.tomlfloor). The test also raises thetorch.__tracelogger toWARNINGfor its duration (restored viaaddCleanup), since dynamo's DEBUG records are replayed by pytest on failure and bury the assertion message.Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.