Skip to content
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

Model history's prompt is "None" after BootstrapFewShot optimization #1737

Open
belmarca opened this issue Nov 1, 2024 · 0 comments
Open

Comments

@belmarca
Copy link

belmarca commented Nov 1, 2024

Hi,

I am running a BootstrapFewShot optimizer on a simple model as follows:

        dspy.settings.configure(lm=student_model)

# ...

        config = dict(
            max_bootstrapped_demos=len(examples),
            max_labeled_demos=len(examples),
            teacher_settings=dict(lm=teacher_model),
        )
        optimizer = BootstrapFewShot(metric=metric, **config)

# ...

        run = optimizer.compile(module(), trainset=examples)

I want to get the optimized prompt out of the student_model but its history is empty. When accessing the teacher_model's history, its "prompt" key is None. I am using the new LM class.

This works fine with the old OpenAI class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant