Fix uncaught ValueError in flatten_pass_by_value on malformed hex input - #343
Conversation
The hex branch of flatten_pass_by_value converted "0x"-prefixed strings without error handling, so malformed values such as "0x" or "0xZZ" in a log's pass_by_value field crashed the cudnn_repro CLI with an unhandled ValueError. Guard the conversion with the same try/except pattern the decimal branch already uses, returning an empty list for unparseable strings, and add regression tests. Fixes NVIDIA#342 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Changesflatten_pass_by_value fix and tests
Estimated code review effort: 1 (Trivial) | ~5 minutes Related issues
Suggested labels: bug, tools Suggested reviewers: (none identified) 🐰 A hex string once made me crash, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The hex branch of flatten_pass_by_value converted "0x"-prefixed strings without error handling, so malformed values such as "0x" or "0xZZ" in a log's pass_by_value field crashed the cudnn_repro CLI with an unhandled ValueError. Guard the conversion with the same try/except pattern the decimal branch already uses, returning an empty list for unparseable strings, and add regression tests.
Fixes #342
Summary by CodeRabbit
Bug Fixes
0xprefix are handled as hexadecimal, while other strings continue to be treated as decimal.Tests
None/numeric values to verify parsing behavior across common cases.