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

Issue + fix for readme code sample #88

Open
nm-openai opened this issue Jul 19, 2024 · 1 comment
Open

Issue + fix for readme code sample #88

nm-openai opened this issue Jul 19, 2024 · 1 comment

Comments

@nm-openai
Copy link

Prompt optimization example doesn't run as-is

Current

import textgrad as tg
llm_engine = tg.get_engine("gpt-3.5-turbo")
tg.set_backward_engine("gpt-4o")

_, val_set, _, eval_fn = load_task("BBH_object_counting", llm_engine)
question_str, answer_str = val_set[0]
question = tg.Variable(question_str, role_description="question to the LLM", requires_grad=False)
answer = tg.Variable(answer_str, role_description="answer to the question", requires_grad=False)

Need to add from textgrad.tasks import load_task for it to run

I also needed to brew install wget for it to work

@mertyg
Copy link
Member

mertyg commented Jul 20, 2024

Thank you for catching this! Will be solved in #89

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

2 participants