dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Teleprompt Base Class -> ABC, Some Static Typing, and Ruff Fixes/Updates

Open mgbvox opened this issue 1 year ago • 6 comments
trafficstars

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).

mgbvox avatar Feb 26 '24 17:02 mgbvox

It's be great if you add a you.com entry to this document? that will help others who want to use you.com If you prefer, a separate PR would work for sure.

insop avatar Feb 26 '24 21:02 insop

@insop do you mean to the documentation? Sure, I can add that. Will get to it this evening.

mgbvox avatar Feb 26 '24 22:02 mgbvox

Had less bandwidth than I anticipated, I plan to sit down and contribute a bunch come early March.

mgbvox avatar Feb 28 '24 17:02 mgbvox

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?

okhat avatar Mar 02 '24 23:03 okhat

dsp.settings.trace

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.

arnavsinghvi11 avatar Mar 05 '24 22:03 arnavsinghvi11

dsp.settings.trace

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 trace to [] by default looks good.

Shangyint avatar Mar 06 '24 19:03 Shangyint