You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile/save my program, I see stuff like this:
"trajectory": "[[ ## thought_0 ## ]]\nI need to determine the margin status of the breast cancer pathology report.\n\n[[ ## tool_name_0 ## ]]\nRegex\n\n[[ ## tool_args_0 ## ]]\n{}\n\n[[ ## observation_0 ## ]]\nFailed to execute: Regex.__call__() missing 1 required positional argument: 'report'\n\n[[ ## thought_1 ## ]]\nI need to determine the margin status of the breast cancer pathology report.\n\n[[ ## tool_name_1 ## ]]\nRegex\n\n[[ ## tool_args_1 ## ]]\n{}\n\n[[ ## observation_1 ## ]]\nFailed to execute: Regex.__call__() missing 1 required positional argument: 'report'\n\n[[ ## thought_2 ## ]]\nI need to determine the margin status of the breast cancer pathology report.\n\n[[ ## tool_name_2 ## ]]\nRegex\n\n[[ ## tool_args_2 ## ]]\n{}\n\n[[ ## observation_2 ## ]]\nFailed to execute: Regex.__call__() missing 1 required positional argument: 'report'\n\n[[ ## thought_3 ## ]]\nI need to determine the margin status of the breast cancer pathology report.\n\n[[ ## tool_name_3 ## ]]\nRegex\n\n[[ ## tool_args_3 ## ]]\n{}\n\n[[ ## observation_3 ## ]]\nFailed to execute: Regex.__call__() missing 1 required positional argument: 'report'\n\n[[ ## thought_4 ## ]]\nI need to determine the margin status of the breast cancer pathology report.\n\n[[ ## tool_name_4 ## ]]\nRegex\n\n[[ ## tool_args_4 ## ]]\n{}\n\n[[ ## observation_4 ## ]]\nFailed to execute: Regex.__call__() missing 1 required positional argument: 'report'",
Not sure if I am doing something wrong or if there is a bug. The documentation is very unclear about the args parameter in particular.
Thanks!
Steps to reproduce
I can't provide the data, but below is the tool function.
classRegex:
"""Simple tool that uses regular expressions to extract margin status."""name="Regex"desc="extracts margin status using regular expressions"args= {'report': {'type': 'string', 'description': 'text from a pathology report'}}
def__init__(self):
self.pattern=re.compile(r"positive margin|margin positive|negative margin|margin negative")
def__call__(self, report: str) ->str:
"""Extract margin status from the report."""match="|".join(self.pattern.findall(report.lower()))
print("Match:", match)
ifmatch:
return"positive"if"positive"inmatchelse"negative"return"inconclusive"
DSPy version
2.6.9rc1
The text was updated successfully, but these errors were encountered:
I tried SmallThinker:3b and DeepSeek-r1:8b, neither of which work on my data. The best model I have access to for this research is DeepSeek-r1:32b, which I haven’t tried yet.
I see. I'd avoid reasoning models for non-reasoning problems; they're known to, at least so far, be overfit to specific types of problems (math, coding) and less good at following arbitrary instructions.
You could use LLama-3.2-3B or 3.1-8B for instance. Or Qwen-2.5 models.
What happened?
(See "Steps to reproduce" for code.)
When I compile/save my program, I see stuff like this:
Not sure if I am doing something wrong or if there is a bug. The documentation is very unclear about the
args
parameter in particular.Thanks!
Steps to reproduce
I can't provide the data, but below is the tool function.
DSPy version
2.6.9rc1
The text was updated successfully, but these errors were encountered: