def test_tune_random_resume_x2_trial_iteration() -> None: """ Runs partial training, saves checkpoint between trials, resumes from checkpoint, runs more training, saves checkpoint between iterations, resumes from checkpoint and finishes training. We can't compare against a non-interrupted version, because the random decisions will be different. This test just ensures that saving/loading runs without crashing. """ # Set up case. save_name = "test_tune_random_resume_x2_trial_iteration" config_path = RANDOM_CONFIG_PATH early_stops = [{ "iterations": 3, "trials": 1 }, { "iterations": 6, "trials": 0 }] baseline_name = None results_name = None # Call template. resume_template(save_name, config_path, early_stops, baseline_name, results_name)
def test_tune_IC_grid_resume_trial() -> None: """ Runs partial training, saves a checkpoint between trials, then resumes from checkpoint and finishes training, comparing results against a non-interrupted version. """ # Set up case. save_name = "test_tune_IC_grid_resume_trial" config_path = IC_GRID_CONFIG_PATH early_stops = [{"param_num": 2, "val_num": 1, "trials": 1}] baseline_name = "tune_IC_grid" results_name = "tune_IC_grid" # Call template. resume_template(save_name, config_path, early_stops, baseline_name, results_name)
def test_tune_grid_resume_iteration() -> None: """ Runs partial training, saves a checkpoint between iterations, then resumes from checkpoint and finishes training, comparing results against a non-interrupted version. """ # Set up case. save_name = "test_tune_grid_resume_iteration" config_path = GRID_CONFIG_PATH early_stops = [{"iterations": 4, "trials": 0}] baseline_name = "tune_grid" results_name = "tune_grid" # Call template. resume_template(save_name, config_path, early_stops, baseline_name, results_name)
def test_tune_IC_grid_resume_x2_trial_iteration() -> None: """ Runs partial training, saves checkpoint between trials, resumes from checkpoint, runs more training, saves checkpoint between iterations, resumes from checkpoint and finishes training. Then compares results against a non-interrupted version. """ # Set up case. save_name = "test_tune_IC_grid_resume_x2_trial_iteration" config_path = IC_GRID_CONFIG_PATH early_stops = [ {"param_num": 0, "val_num": 1, "trials": 1}, {"param_num": 2, "val_num": 0, "trials": 0}, ] baseline_name = "tune_IC_grid" results_name = "tune_IC_grid" # Call template. resume_template(save_name, config_path, early_stops, baseline_name, results_name)