Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename base_ to root_
  • Loading branch information
mfeurer committed Jun 12, 2023
commit f2963091c34e439d797a55cd5bbbfc4f8783336c
22 changes: 11 additions & 11 deletions openml/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ def get_cache_directory():
"""Get the current cache directory.

This gets the cache directory for the current server relative
to the base cache directory that can be set via
``set_base_cache_directory()``. The cache directory is the
``base_cache_directory`` with additional information on which
to the root cache directory that can be set via
``set_root_cache_directory()``. The cache directory is the
``root_cache_directory`` with additional information on which
subdirectory to use based on the server name. By default it is
``base_cache_directory / org / openml / www`` for the standard
``root_cache_directory / org / openml / www`` for the standard
OpenML.org server and is defined as
``base_cache_directory / top-level domain / second-level domain /
``root_cache_directory / top-level domain / second-level domain /
hostname``
```

Expand All @@ -366,19 +366,19 @@ def get_cache_directory():
return _cachedir


def set_base_cache_directory(base_cache_directory):
def set_root_cache_directory(root_cache_directory):
"""Set module-wide base cache directory.

Sets the base cache directory that defines how the actual cache
directory for the server being used is derived. This is
``base_cache_directory / top-level domain / second-level domain /
``root_cache_directory / top-level domain / second-level domain /
hostname``, and by default is set to
``base_cache_directory / org / openml / www`` for the standard
``root_cache_directory / org / openml / www`` for the standard
OpenML.org server.

Parameters
----------
base_cache_directory : string
root_cache_directory : string
Path to use as cache directory.

See also
Expand All @@ -387,7 +387,7 @@ def set_base_cache_directory(base_cache_directory):
"""

global _cache_directory
_cache_directory = base_cache_directory
_cache_directory = root_cache_directory


start_using_configuration_for_example = (
Expand All @@ -398,7 +398,7 @@ def set_base_cache_directory(base_cache_directory):

__all__ = [
"get_cache_directory",
"set_base_cache_directory",
"set_root_cache_directory",
"start_using_configuration_for_example",
"stop_using_configuration_for_example",
"get_config_as_dict",
Expand Down