Skip to content

Commit

Permalink
fix loky/concurrency issue (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeurer authored Mar 30, 2021
1 parent d9037e7 commit 5511fa0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions openml/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,6 @@ def _get(config, key):
connection_n_retries = int(_get(config, "connection_n_retries"))
max_retries = int(_get(config, "max_retries"))

if cache_exists:
_create_log_handlers()
else:
_create_log_handlers(create_file_handler=False)
openml_logger.warning(
"No permission to create OpenML directory at %s! This can result in OpenML-Python "
"not working properly." % config_dir
)

cache_directory = os.path.expanduser(short_cache_dir)
# create the cache subdirectory
if not os.path.exists(cache_directory):
Expand All @@ -251,6 +242,15 @@ def _get(config, key):
"OpenML-Python not working properly." % cache_directory
)

if cache_exists:
_create_log_handlers()
else:
_create_log_handlers(create_file_handler=False)
openml_logger.warning(
"No permission to create OpenML directory at %s! This can result in OpenML-Python "
"not working properly." % config_dir
)

if connection_n_retries > max_retries:
raise ValueError(
"A higher number of retries than {} is not allowed to keep the "
Expand Down

0 comments on commit 5511fa0

Please sign in to comment.