Skip to content

Commit 5511fa0

Browse files
authored
fix loky/concurrency issue (#1042)
1 parent d9037e7 commit 5511fa0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

openml/config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,6 @@ def _get(config, key):
231231
connection_n_retries = int(_get(config, "connection_n_retries"))
232232
max_retries = int(_get(config, "max_retries"))
233233

234-
if cache_exists:
235-
_create_log_handlers()
236-
else:
237-
_create_log_handlers(create_file_handler=False)
238-
openml_logger.warning(
239-
"No permission to create OpenML directory at %s! This can result in OpenML-Python "
240-
"not working properly." % config_dir
241-
)
242-
243234
cache_directory = os.path.expanduser(short_cache_dir)
244235
# create the cache subdirectory
245236
if not os.path.exists(cache_directory):
@@ -251,6 +242,15 @@ def _get(config, key):
251242
"OpenML-Python not working properly." % cache_directory
252243
)
253244

245+
if cache_exists:
246+
_create_log_handlers()
247+
else:
248+
_create_log_handlers(create_file_handler=False)
249+
openml_logger.warning(
250+
"No permission to create OpenML directory at %s! This can result in OpenML-Python "
251+
"not working properly." % config_dir
252+
)
253+
254254
if connection_n_retries > max_retries:
255255
raise ValueError(
256256
"A higher number of retries than {} is not allowed to keep the "

0 commit comments

Comments
 (0)