Conversation
…ton kernel accuracy diff (vllm-project#31776)" This reverts commit ee2e69d.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA test assertion method was changed from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/models/language/pooling/test_token_classification.py`:
- Line 81: Replace the muted bare assertion using torch.allclose with
torch.testing.assert_close to restore detailed diagnostics and the original
tolerances; specifically, in the test assertion that compares hf_output and
vllm_output (the line currently using torch.allclose), call
torch.testing.assert_close(hf_output, vllm_output, atol=1.2e-2, rtol=1e-3) so
the test uses the intended looser absolute and relative tolerances and emits
helpful element-level difference messages on failure.
| hf_output = hf_output.detach().clone().cpu().float() | ||
| vllm_output = vllm_output.detach().clone().cpu().float() | ||
| torch.testing.assert_close(hf_output, vllm_output, atol=1.2e-2, rtol=1e-3) | ||
| assert torch.allclose(hf_output, vllm_output, atol=1e-2) |
There was a problem hiding this comment.
Reverting from torch.testing.assert_close to torch.allclose degrades test quality and may cause flakiness.
This change introduces two issues:
-
Loss of diagnostics:
torch.testing.assert_closeprovides detailed error messages showing which elements differ and by how much. Usingassert torch.allclose(...)only raises a bareAssertionErrorwith no useful debugging information when the test fails. -
Stricter tolerance: The original used
atol=1.2e-2, rtol=1e-3. The new code usesatol=1e-2with defaultrtol=1e-5— this is stricter on both absolute (20% reduction) and relative (100× stricter) tolerances. Given this test exists specifically to handle Triton kernel numerical differences (per the upstream PR#31776this reverts), tighter tolerances risk intermittent test failures.
Suggested fix
- assert torch.allclose(hf_output, vllm_output, atol=1e-2)
+ torch.testing.assert_close(hf_output, vllm_output, atol=1.2e-2, rtol=1e-3)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| assert torch.allclose(hf_output, vllm_output, atol=1e-2) | |
| torch.testing.assert_close(hf_output, vllm_output, atol=1.2e-2, rtol=1e-3) |
🤖 Prompt for AI Agents
In `@tests/models/language/pooling/test_token_classification.py` at line 81,
Replace the muted bare assertion using torch.allclose with
torch.testing.assert_close to restore detailed diagnostics and the original
tolerances; specifically, in the test assertion that compares hf_output and
vllm_output (the line currently using torch.allclose), call
torch.testing.assert_close(hf_output, vllm_output, atol=1.2e-2, rtol=1e-3) so
the test uses the intended looser absolute and relative tolerances and emits
helpful element-level difference messages on failure.
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
Context
This pull request reproduces a historical code change from the vLLM repository
for the purpose of evaluating automated code review tools.
References
Upstream fix PR: vllm-project#31776
Notes
This PR is not intended to be merged
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.