File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed
Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change 3535logger .setLevel (logging .DEBUG )
3636
3737file_list = []
38- directory = None
39-
40- # finding the root directory of conftest.py and going up to OpenML main directory
41- # exploiting the fact that conftest.py always resides in the root directory for tests
42- static_dir = os .path .dirname (os .path .abspath (__file__ ))
43- logger .info ("static directory: {}" .format (static_dir ))
44- while True :
45- if "openml" in os .listdir (static_dir ):
46- break
47- static_dir = os .path .join (static_dir , ".." )
4838
4939
5040def worker_id () -> str :
@@ -66,12 +56,11 @@ def read_file_list() -> List[str]:
6656
6757 :return: List[str]
6858 """
69- directory = os .path .join (static_dir , "tests/files/" )
70- if worker_id () == "master" :
71- logger .info ("Collecting file lists from: {}" .format (directory ))
72- files = os .walk (directory )
59+ this_dir = os .path .abspath (os .path .dirname (os .path .abspath (__file__ )))
60+ directory = os .path .join (this_dir , ".." )
61+ logger .info ("Collecting file lists from: {}" .format (directory ))
7362 file_list = []
74- for root , _ , filenames in files :
63+ for root , _ , filenames in os . walk ( directory ) :
7564 for filename in filenames :
7665 file_list .append (os .path .join (root , filename ))
7766 return file_list
You can’t perform that action at this time.
0 commit comments