openml / openml-python

OpenML's Python API for a World of Data and More 💫
http://openml.github.io/openml-python/
Other
279 stars 143 forks source link

Cache directory typo in docs #1347

Open prabhant opened 1 month ago

prabhant commented 1 month ago

Description

The cache directory change from example did not really work for me: https://openml.github.io/openml-python/develop/examples/20_basic/introduction_tutorial.html

``

Steps/Code to Reproduce

Expected Results

openml.config.get_cache_directory()
'mydir'

Actual Results

openml.config.get_cache_directory()
'oldcache'

Versions

PS: This worked for me when I used openml.config._root_cache_directory

PGijsbers commented 1 month ago

The way the cache directory should be set changed. It should be :

openml.config.set_root_cache_directory("my/directory")

This internally sets openml.config._root_cache_directory, but it's more future proof (private variable may change in new releases without notice).

The documentation needs an update here.