File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ target/
8888.idea
8989* .swp
9090.vscode
91+ .cursorignore
92+ .cursorindexingignore
9193
9294# MYPY
9395.mypy_cache
@@ -96,4 +98,7 @@ dmypy.sock
9698
9799# Tests
98100.pytest_cache
99- .venv
101+ .venv
102+
103+ # Ruff
104+ .ruff-cache /
Original file line number Diff line number Diff line change @@ -127,7 +127,6 @@ plugins:
127127 docstring_options :
128128 ignore_init_summary : true
129129 trim_doctest_flags : true
130- returns_multiple_items : false
131130 show_docstring_attributes : true
132131 show_docstring_description : true
133132 show_root_heading : true
@@ -138,7 +137,7 @@ plugins:
138137 merge_init_into_class : true
139138 show_symbol_type_heading : true
140139 show_symbol_type_toc : true
141- docstring_style : google
140+ docstring_style : numpy
142141 inherited_members : true
143142 show_if_no_docstring : false
144143 show_bases : true
Original file line number Diff line number Diff line change @@ -415,8 +415,9 @@ def get_task(
415415 if not isinstance (task_id , int ):
416416 raise TypeError (f"Task id should be integer, is { type (task_id )} " )
417417
418- tid_cache_dir = openml .utils ._create_cache_directory_for_id (TASKS_CACHE_DIR_NAME , task_id )
419-
418+ cache_key_dir = openml .utils ._create_cache_directory_for_id (TASKS_CACHE_DIR_NAME , task_id )
419+ tid_cache_dir = cache_key_dir / str (task_id )
420+ tid_cache_dir_existed = tid_cache_dir .exists ()
420421 try :
421422 task = _get_task_description (task_id )
422423 dataset = get_dataset (task .dataset_id , ** get_dataset_kwargs )
@@ -430,7 +431,8 @@ def get_task(
430431 if download_splits and isinstance (task , OpenMLSupervisedTask ):
431432 task .download_split ()
432433 except Exception as e :
433- openml .utils ._remove_cache_dir_for_id (TASKS_CACHE_DIR_NAME , tid_cache_dir )
434+ if not tid_cache_dir_existed :
435+ openml .utils ._remove_cache_dir_for_id (TASKS_CACHE_DIR_NAME , tid_cache_dir )
434436 raise e
435437
436438 return task
You can’t perform that action at this time.
0 commit comments