| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Remove dead duplicate reasoning_match in _parse_reasoning_and_output else block (identical regex would never match) - Remove dead elif branch in _parse_reasoning_and_output (same condition as preceding if) - Fix ineffective validation guard: require_precomputed_predictions was checking has_mesa_and_action instead of has_all_precomputed
| Back | FazBrowse Home | New Git URL |
Summary
Three fixes in uni_eval/evaluators/deception_bench.py:
1. Dead code: duplicate regex in else block (lines 105-108)
The _parse_reasoning_and_output function runs a regex to extract reasoning, and the else block runs the identical regex — it will never match. Replaced the dead block with pass.
2. Dead code: duplicate elif condition (lines 119-121)
Both the if and elif branches check " response" in response — the elif can never execute. Consolidated to a simple if/else.
3. Ineffective validation guard (line 548)
The evaluate method checks require_precomputed_predictions but validates against has_mesa_and_action, which is guaranteed to be True at that point (the outer if already ensures it). Changed to has_all_precomputed so the guard actually catches missing precomputed reasoning fields when prediction data is strictly required.