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

Deep dive teleprompter rename #985

Closed

Conversation

tom-doerr
Copy link
Contributor

I keep getting confused when I search for information on optimizers and can't find it since some sections are still named teleprompters. I just went ahead and refactored the deep dive section. I hope you don't mind!

@arnavsinghvi11
Copy link
Collaborator

Hi @tom-doerr , thanks for this change! This has been long overdue but we will also need to do this refactoring within the repository to align with Optimizers overall. @okhat is this a good time to make this transition?

@tom-doerr
Copy link
Contributor Author

If it's basically just renaming teleprompt to optimize and adding deprecation warnings if someone continues to use teleprompt I could try to add it to the PR

@tom-doerr
Copy link
Contributor Author

Adding deprecation warnings while keeping it functional seems straightforward.
dspy/teleprompt/teleprompt.py would become:

import warnings
warnings.warn(
    "The 'teleprompt' module has been renamed to 'optimize'. Please update your imports.",
    DeprecationWarning
)
from dspy.optimize.optimize import *

Would be happy to help out with refactoring.

@okhat
Copy link
Collaborator

okhat commented May 15, 2024

Hmm I think this PR goes a bit farther than it should. The problem is that many teleprompters are definitely not optimizers, e.g. BootstrapFewShotWithRandomSearch is an optimizer but BootstrapFewShot is not.

@tom-doerr
Copy link
Contributor Author

Ah okay, LabeledFewShot is probably also not an optimizer

@tom-doerr tom-doerr closed this May 15, 2024
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

Successfully merging this pull request may close these issues.

3 participants