@@ -39,9 +39,7 @@ def load_study_config(study_name: str) -> dict:
3939 Load the YAML config used by the study (optuna_config.yaml).
4040 """
4141
42- config_path = os .path .join (
43- "optuna_runs" , "studies" , study_name , "optuna_config.yaml"
44- )
42+ config_path = os .path .join ("tuned" , "studies" , study_name , "optuna_config.yaml" )
4543 with open (config_path , "r" ) as file :
4644 return yaml .safe_load (file )
4745
@@ -117,7 +115,7 @@ def plot_test_losses(
117115 plt .legend (loc = "center left" , bbox_to_anchor = (1 , 0.5 ))
118116 plt .tight_layout ()
119117
120- plots_dir = os .path .join ("optuna_runs " , "studies" , study_name , "plots" )
118+ plots_dir = os .path .join ("tuned " , "studies" , study_name , "plots" )
121119 os .makedirs (plots_dir , exist_ok = True )
122120 plt .savefig (os .path .join (plots_dir , "test_losses_comparison.png" ))
123121 plt .close ()
@@ -134,7 +132,7 @@ def main():
134132 top_n = args .top_n
135133
136134 # Load the existing study from its DB
137- db_path = f"sqlite:///optuna_runs /studies/{ study_name } /{ study_name } .db"
135+ db_path = f"sqlite:///tuned /studies/{ study_name } /{ study_name } .db"
138136 study = optuna .load_study (study_name = study_name , storage = db_path )
139137
140138 # Print best trial
@@ -147,7 +145,7 @@ def main():
147145 print (f"\n Total number of runs: { len (study .trials )} " )
148146
149147 # Make sure plots directory exists
150- plots_dir = os .path .join ("optuna_runs " , "studies" , study_name , "plots" )
148+ plots_dir = os .path .join ("tuned " , "studies" , study_name , "plots" )
151149 os .makedirs (plots_dir , exist_ok = True )
152150
153151 # Optionally transform MSE to log10 for better plotting
@@ -176,12 +174,12 @@ def main():
176174 labels = []
177175
178176 # Models are stored:
179- # optuna_runs /studies/<study_name>/models/<ClassName>/<model_name>.pth
177+ # tuned /studies/<study_name>/models/<ClassName>/<model_name>.pth
180178 # where <model_name> might be something like "fullyconnected_3.pth"
181179 for trial in best_trials :
182180 model_filename = f"{ surrogate_name .lower ()} _{ trial .number } .pth"
183181 model_path = os .path .join (
184- "optuna_runs " ,
182+ "tuned " ,
185183 "studies" ,
186184 study_name ,
187185 "models" ,
0 commit comments