| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[fix] robustness | 2 个月前 | |
[update] tie embedding | 5 个月前 | |
[fix] replace tool eval() with an AST math evaluator execute_tool() relied on signal.SIGALRM, which does not exist on Windows. The AttributeError was swallowed by a bare except, so every tool call silently returned None and the model always observed {"error": "tool not found"} (issue #846). calculate_math also ran eval() on model-generated text. Two of the three call sites (scripts/eval_toolcall.py, scripts/web_demo.py) passed no globals at all, leaving full builtins reachable from sampled output. safe_math_eval() in trainer_utils.py parses the expression with ast and walks it, allowing only arithmetic operators and a math whitelist, with caps on expression length and exponent size. It cannot loop forever, so the signal-based timeout is no longer needed and is removed. Both sqrt(x) and math.sqrt(x) spellings keep working. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> | 16 天前 | |
[fix] robustness | 2 个月前 | |
[fix] replace tool eval() with an AST math evaluator execute_tool() relied on signal.SIGALRM, which does not exist on Windows. The AttributeError was swallowed by a bare except, so every tool call silently returned None and the model always observed {"error": "tool not found"} (issue #846). calculate_math also ran eval() on model-generated text. Two of the three call sites (scripts/eval_toolcall.py, scripts/web_demo.py) passed no globals at all, leaving full builtins reachable from sampled output. safe_math_eval() in trainer_utils.py parses the expression with ast and walks it, allowing only arithmetic operators and a math whitelist, with caps on expression length and exponent size. It cannot loop forever, so the signal-based timeout is no longer needed and is removed. Both sqrt(x) and math.sqrt(x) spellings keep working. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> | 16 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 5 个月前 | ||
| 16 天前 | ||
| 2 个月前 | ||
| 16 天前 |