fix: assorted small fixes (patchset lookup, logpdf error logging, typos)#2709
fix: assorted small fixes (patchset lookup, logpdf error logging, typos)#2709henryiii wants to merge 1 commit into
Conversation
- patchset.py: remove vestigial sentinel keys from _patches_by_key so
that looking up "name" or "values" correctly raises InvalidPatchLookup
instead of returning {} or falsely triggering duplicate-patch errors
- pdf.py: fix logpdf except handler to log data/pars with %r instead of
calling tensorlib.tolist(), which can itself raise and mask the original
exception
- pdf.py: rename typo variables finalizd_builder_data → finalized_builder_data
and _prameter_objects → _parameter_objects
- infer/test_statistics.py: fix _qmu_like docstring: "muhat > mu" not "muhat > 0"
Assisted-by: ClaudeCode:claude-sonnet-4.6
|
Warning Review limit reached
More reviews will be available in 29 minutes and 59 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
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. Additional details and impacted files@@ Coverage Diff @@
## main #2709 +/- ##
==========================================
- Coverage 98.28% 96.42% -1.86%
==========================================
Files 65 65
Lines 4305 4305
Branches 465 465
==========================================
- Hits 4231 4151 -80
- Misses 46 120 +74
- Partials 28 34 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🤖 AI text below 🤖
Part of the code review in #2706.
Summary
{"name": {}, "values": {}}sentinel keys from_patches_by_key, which caused two bugs: a patch named"name"or"values"falsely triggered the duplicate-patch error, andpatchset["name"]returned{}instead of raisingInvalidPatchLookup. Now initialized to{}.Model.logpdf): Fix the except handler to use%rdirectly ondata/parsinstead of callingtensorlib.tolist(), which can itself raise (e.g. on ragged input) and mask the original exception.finalizd_builder_data→finalized_builder_dataand_prameter_objects→_parameter_objects._qmu_likedocstring: condition ismuhat > mu, notmuhat > 0.Test plan
pytest tests/test_patchset.py tests/test_pdf.py tests/test_teststats.py -q— 105 passed, 6 skipped (backend-skip markers)test_patchset_sentinel_keys_raiseverifies thatpatchset["name"]andpatchset["values"]raiseInvalidPatchLookupprek -a --quiet— clean🤖 Generated with Claude Code