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

logs folder is automatically created when importing TextGrad with no option to not to create logs folder #152

Open
niclasko opened this issue Jan 25, 2025 · 2 comments

Comments

@niclasko
Copy link

Hello,

Thank you for a great library. When importing TextGrad, a logs folder is created automatically with seemingly no option to not create the logs folder. Is there a way?

Best regards,
Niclas Kjäll-ohlsson

@niclasko
Copy link
Author

niclasko commented Jan 25, 2025

I do this workaround now before importing TextGrad so that the logs folder is created in the tmp dir instead of cwd:

import os
import textgrad

# This is a workaround to avoid that TextGrad creates a logs folder in the current working directory
# and instead creates it in the temporary directory.
cwd: str = os.getcwd()
os.chdir(tempfile.gettempdir())

import TextGrad as tg

# Reset the current working directory
os.chdir(cwd)

@vinid
Copy link
Collaborator

vinid commented Jan 25, 2025

would you prefer to be able to specify a directory for the logs or to disable it completely? should be an easy fix I can prepare a PR

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