fix: Fix pytest warning filters#990
Conversation
Avoid importing optional BoTorch warning classes during pytest startup and make the flat-shape deprecation assertion resilient to unrelated caplog records. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Anthony Casagrande <acasagrande@nvidia.com>
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@0cd75755aaa529bfcf1bdf5154fa064978ab75cdRecommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@0cd75755aaa529bfcf1bdf5154fa064978ab75cdLast updated for commit: |
WalkthroughThis PR improves test stability by broadening the pytest warning filter for torch.float32 messages and refining test caplog filtering to tolerate unrelated warnings. The test now filters log records more precisely and asserts on matching records rather than relying on a fixed record position. ChangesTest stability and warning handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Test plan
uv run pytest -n auto tests/unit/config/test_envelope_restructure.py -q🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Tests