3838BASELINE_PATH = os .path .join (RESULTS_DIR , "baseline.json" )
3939
4040CI_DATASETS = {
41- "S1" : "tiny" , "S2" : "unequal" , "S3" : "single_large" ,
42- "S4" : "tiny" , "S5" : "tiny" , "S6" : "root" ,
43- "S7" : "tiny" , "S8" : "tiny" ,
41+ "S1" : "tiny" ,
42+ "S2" : "unequal" ,
43+ "S3" : "single_large" ,
44+ "S4" : "tiny" ,
45+ "S5" : "tiny" ,
46+ "S6" : "root" ,
47+ "S7" : "tiny" ,
48+ "S8" : "tiny" ,
4449}
4550DEFAULT_DATASETS = {
46- "S1" : "large" , "S2" : "unequal" , "S3" : "single_large" ,
47- "S4" : "large" , "S5" : "large" , "S6" : "root" ,
48- "S7" : "small" , "S8" : "small" ,
51+ "S1" : "large" ,
52+ "S2" : "unequal" ,
53+ "S3" : "single_large" ,
54+ "S4" : "large" ,
55+ "S5" : "large" ,
56+ "S6" : "root" ,
57+ "S7" : "small" ,
58+ "S8" : "small" ,
4959}
5060
5161
5262def _run_metadata () -> dict :
5363 import importlib .metadata
64+
5465 try :
5566 version = importlib .metadata .version ("torch-dataloader-utils" )
5667 except Exception :
5768 version = "dev"
5869 try :
5970 import subprocess
60- git_sha = subprocess .check_output (
61- ["git" , "rev-parse" , "--short" , "HEAD" ], stderr = subprocess .DEVNULL
62- ).decode ().strip ()
71+
72+ git_sha = (
73+ subprocess .check_output (
74+ ["git" , "rev-parse" , "--short" , "HEAD" ], stderr = subprocess .DEVNULL
75+ )
76+ .decode ()
77+ .strip ()
78+ )
6379 except Exception :
6480 git_sha = "unknown"
6581 return {
@@ -134,7 +150,6 @@ def main() -> int:
134150 module , uses_root = ALL_SCENARIOS [sid ]
135151 ds = dataset_map [sid ]
136152 d = _dataset_dir (args .data_dir , sid , ds , uses_root )
137- check_dir = d if uses_root else d
138153 # For root-dir scenarios, verify the subdatasets that exist
139154 if uses_root :
140155 for sub in ["tiny" , "small" , "medium" , "large" ]:
@@ -158,11 +173,11 @@ def main() -> int:
158173 module , uses_root = ALL_SCENARIOS [sid ]
159174 ds = dataset_map [sid ]
160175 d = _dataset_dir (args .data_dir , sid , ds , uses_root )
161- print (f"\n { '=' * 60 } " )
176+ print (f"\n { '=' * 60 } " )
162177 print (f"Running { sid } : { module .__name__ .split ('.' )[- 1 ]} " )
163178 print (f" data_dir : { d } " )
164179 print (f" n_runs : { n_runs } n_warmup: { n_warmup } " )
165- print (f"{ '=' * 60 } " )
180+ print (f"{ '=' * 60 } " )
166181 try :
167182 result = module .run (d , n_warmup = n_warmup , n_runs = n_runs )
168183 all_results ["scenarios" ][sid ] = result
0 commit comments