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

Turn off cache in Textgrad #107

Open
XuGW-Kevin opened this issue Aug 12, 2024 · 3 comments
Open

Turn off cache in Textgrad #107

XuGW-Kevin opened this issue Aug 12, 2024 · 3 comments

Comments

@XuGW-Kevin
Copy link

It seems that currently if we input the same prompt twice, for the second time Textgrad will automatically use the cached engine and return the cached results. However, in some cases, we want to generate different results each time. Therefore, can we add cache_result to the initialization of Textgrad Engine, so that it will cache results only if we set cache_result=True ?

@belmarca
Copy link

Definitely, and caching should be made explicit! It took me a while to figure it out...

@belmarca
Copy link

For anyone looking to fix this, I temporarily nuke the cache. Here's an example on Debian:

rm -rf ~/.cache/textgrad/

@mertyg
Copy link
Member

mertyg commented Aug 29, 2024

We agree with this. A priority led by @vinid will be to unify and improve our engine interface using LiteLLM or a package like this, and we will fix this. This comes from the research origins of the paper, and we will make it more usable!

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

3 participants