-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teleprompt Base Class -> ABC, Some Static Typing, and Ruff Fixes/Updates #467
Conversation
It's be great if you add a you.com entry to this document? that will help others who want to use you.com |
@insop do you mean to the documentation? Sure, I can add that. Will get to it this evening. |
dspy/primitives/assertions.py
Outdated
@@ -237,7 +237,9 @@ def wrapper(*args, **kwargs): | |||
break | |||
else: | |||
try: | |||
dsp.settings.trace.clear() | |||
# only try to clear the trace if one exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this makes sense but I worry it's hiding a different issue under the hood?
Had less bandwidth than I anticipated, I plan to sit down and contribute a bunch come early March. |
Tagging @arnavsinghvi11 for the issue above it comes up a lot: dsp.settings.trace being None by default causes issues. Is setting it globally to [] correct? Probably not? It affects optimization somewhere? Is there any code checking for dspy.settings.trace that assumes it None and [] are different? |
Yeah I believe we should set it to [] going forward since there are checks in assertion.py. It seems that the optimizations logic also set trace = [] internally so I believe we can make this change globally in settings. Let me know if that aligns and I can push a PR for it. |
Agree with @arnavsinghvi11, setting |
Only clear dsp.setting.trace in assertions.py if a trace object exists.
Adapt YouRM API call signature to match the documentation on https://api.you.com/api-key; update return data to respect self.k (as opposed to returning all snippets from the first K hits).