fix missing ToolRubric import#741
fix missing ToolRubric import#741ADharaUTEXAS123007 wants to merge 1 commit intoPrimeIntellect-ai:mainfrom
Conversation
|
ARNAB DHARA seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| tool_call.function, "name" | ||
| ): | ||
| if tool_call.function.name == tool_name: | ||
| count += 1 |
There was a problem hiding this comment.
Per-tool counter uses attribute access on dictionary
High Severity
The get_tool_call_count_func method uses attribute access (hasattr(tool_call, "function") and tool_call.function.name) on tool_call items, but completion messages passed to rubric functions are dictionaries, not OpenAI response objects. Dictionary items don't have a function attribute, so hasattr returns False and per-tool counts are always 0. The existing ToolMonitorRubric in tool_env.py correctly uses dictionary access: tool_call.get("function", {}).get("name").
|
|
Description
When I ran "wiki-search" example, it gave an error saying "verifiers has no attribute ToolRubric".
So, I created file verifiers/verifiers/rubrics/tool_rubric.py with ToolRubric class
Added the import .rubrics.tool_rubric import ToolRubric to init.py
Type of Change
Testing
uv run pytestlocally.Checklist
Additional Notes
Note
Adds a rubric to evaluate tool usage and exposes it as part of the public API.
ToolRubriccounts total tool calls and per-tool calls from assistant messages; initializes reward funcs dynamically from providedtoolsToolRubricinverifiers/__init__.py(runtime exports and TYPE_CHECKING) to fixverifiers has no attribute ToolRubricWritten by Cursor Bugbot for commit 284335b. This will update automatically on new commits. Configure here.