We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I started my dspy journey with the 2.5.3 version. Following the quickstart example I created a llm instance
dspy.OpenAI(...)
However this approach seems to be deprecated, so now I use
dspy.LM(...)
I was using the BootstrapFewShot for a while. It worked until I increased to max_round param to 2, from the default 1.
The error is
File "/home/kpob/workspace/python/dspy-test/lib/python3.10/site-packages/dspy/teleprompt/bootstrap.py", line 182, in _bootstrap_one_example lm = lm.copy(temperature=0.7 + 0.001 * round_idx) if round_idx > 0 else lm AttributeError: 'LM' object has no attribute 'copy'
My issue is similar to #1391. Yet I do not implement my custom LM, but just passing a model as a teacher.
def __init__(self, metric, lm: dspy.LM, program, program_name: str, metric_threshold=1.0): self.lm = lm self.metric = metric self.metric_threshold = metric_threshold self.program_name = program_name self.program = program def __call__(self, trainset, record=True, experiment=""): optimizer = dspy.BootstrapFewShot( metric=self.metric, metric_threshold=self.metric_threshold, max_labeled_demos=2, max_rounds=3, teacher_settings=dict(lm=self.lm) )
The text was updated successfully, but these errors were encountered:
Hey, thanks @kpob for the catch. This is a new bug and I'll fix it today if I can.
Sorry, something went wrong.
No branches or pull requests
I started my dspy journey with the 2.5.3 version. Following the quickstart example I created a llm instance
However this approach seems to be deprecated, so now I use
I was using the BootstrapFewShot for a while. It worked until I increased to max_round param to 2, from the default 1.
The error is
My issue is similar to #1391. Yet I do not implement my custom LM, but just passing a model as a teacher.
The text was updated successfully, but these errors were encountered: