Reject non-finite Softmax temperature - #1044
alaabenfatma wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 SummarySummary by CodeRabbit
Walkthrough
ChangesSoftmax temperature validation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: ⚪ Minimal · up to Softmax now rejects invalid temperatures while accepting valid positive values; no actionable merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Hi - thanks for the PR. We try to keep the checks as minimal as possible see: https://github.com/NVIDIA/structured-data-models/blob/e22aecb0d902c380f758de2771e3a66d41cd5022/AGENTS.md#pythonpytorch-coding-style
I'll update the issue accordingly. We rather need to update |
Fixes the
SoftmaxTemperatureitem in #105.Softmaxonly rejectedtemperature <= 0, sonanandinfwere accepted:nanturned every probability into NaN andinfquietly returned a uniform distribution. It now raises unless the temperature is finite and positive, matchingClipSoft'smax_absolute_valuecheck.