88from benchmark import run_benchmarks
99
1010def main ():
11- # Get the root directory (parent of the current script's directory)
12- script_dir = os .path .dirname (os .path .abspath (__file__ ))
13- root_dir = os .path .dirname (script_dir )
14- config_path = os .path .join (root_dir , "config.yml" )
11+ # Load config from current working directory (where user runs the command)
12+ config_path = os .path .join (os .getcwd (), "config.yml" )
1513
1614 if not os .path .exists (config_path ):
17- print (f"config.yml not found in root directory: { config_path } " )
15+ print (f"config.yml not found in current directory: { config_path } " )
16+ print ("Please make sure config.yml is in the directory where you run 'benchtool'" )
1817 sys .exit (1 )
1918
2019 with open (config_path , "r" ) as f :
@@ -28,9 +27,9 @@ def main():
2827 input_config = config .get ("input" , {})
2928 if input_config .get ("mode" ) == "csv" :
3029 csv_path = input_config ["csv" ]["path" ]
31- # If the path is not absolute, resolve it relative to the root directory
30+ # If the path is not absolute, resolve it relative to the current working directory
3231 if not os .path .isabs (csv_path ):
33- csv_path = os .path .join (root_dir , csv_path )
32+ csv_path = os .path .join (os . getcwd () , csv_path )
3433 input_config ["csv" ]["path" ] = csv_path
3534 note_texts = load_notes (input_config ) # This loads the notes based on config (CSV mode)
3635
0 commit comments