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

[Feature] Environment variable for openml cache #1324

Open
eddiebergman opened this issue Jan 18, 2024 · 3 comments
Open

[Feature] Environment variable for openml cache #1324

eddiebergman opened this issue Jan 18, 2024 · 3 comments

Comments

@eddiebergman
Copy link
Collaborator

This could be useful in certain scenarios where you may have programmatic access before running something but during the execution of the python script, you do not have access to it.

I would recommend something like "OPENML_CACHE_DIRECTORY"?

@PGijsbers
Copy link
Collaborator

PGijsbers commented Jan 18, 2024

Note that on Linux we already observe XDG_CACHE_HOME:

"cachedir": (
Path(os.environ.get("XDG_CACHE_HOME", _user_path / ".cache" / "openml"))
if platform.system() == "Linux"
else _user_path / ".openml"

as proposed in #884.

That said, adding another option (that takes precedence, if set) does not take a lot of work, and would add an environment option with cross-platform support.

@eddiebergman
Copy link
Collaborator Author

The use case just to be more transparent is that I have a cli I can control which launches another script which may use openml but may not necessarily allow a passed in option to set the cache directory.

It's not very problematic in this scenario but I've always been super appreciative of an environment variable in just the right place

@PGijsbers
Copy link
Collaborator

Sorry if I sounded negative towards the idea. I do think it's a good suggestion and am in favor of adding it, I just wanted to point out that for some use cases it already kind-of supports what you were asking for.

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

No branches or pull requests

2 participants