diff --git a/src/metahyper/api.py b/src/metahyper/api.py index c02717a5..98591280 100644 --- a/src/metahyper/api.py +++ b/src/metahyper/api.py @@ -367,15 +367,6 @@ def run( if not Path(sampler_info_file).exists(): # Write the sampler_info to a YAML file serializer.dump(sampler_info, sampler_info_file, sort_keys=False) - else: - # Load the sampler_info from a YAML file - sampler_info_from_file = serializer.load(sampler_info_file) - # Check if the sampler_info is valid - if sampler_info != sampler_info_from_file: - raise ValueError( - f"The sampler_info in the file {sampler_info_file} is not valid. " - f"Expected: {sampler_info}, Found: {sampler_info_from_file}" - ) evaluations_in_this_run = 0 while True: diff --git a/src/neps/api.py b/src/neps/api.py index 2b8de866..e280433c 100644 --- a/src/neps/api.py +++ b/src/neps/api.py @@ -264,7 +264,7 @@ def run( "searcher_name": searcher, "searcher_alg": searcher_alg, "user_defined_searcher": user_defined_searcher, - "args_accepted_changes": None, + "searcher_args_user_modified": False, } # Updating searcher arguments from searcher_kwargs @@ -281,7 +281,7 @@ def run( f"The searcher argument '{key}' has the same" f" value '{value}' as default." ) - searcher_info["args_accepted_changes"] = True + searcher_info["searcher_args_user_modified"] = True else: # No searcher argument updates when NePS decides the searcher. logger.info(35 * "=" + "WARNING" + 35 * "=") @@ -290,7 +290,7 @@ def run( f"The searcher argument '{key}' will not change to '{value}'" f" because NePS chose the searcher" ) - searcher_info["args_accepted_changes"] = False + searcher_info["searcher_args_user_modified"] = False searcher_config.update( { diff --git a/tests/test_neps_api/test_yaml_api.py b/tests/test_neps_api/test_yaml_api.py index 1f35a528..a54a274d 100644 --- a/tests/test_neps_api/test_yaml_api.py +++ b/tests/test_neps_api/test_yaml_api.py @@ -33,31 +33,31 @@ def no_logs_gte_error(caplog): "searcher_name": "priorband_bo", "searcher_alg": "priorband", "user_defined_searcher": True, - "args_accepted_changes": True, + "searcher_args_user_modified": True, }, "priorband_neps_decided": { "searcher_name": "priorband", "searcher_alg": "priorband", "user_defined_searcher": False, - "args_accepted_changes": False, + "searcher_args_user_modified": False, }, "bo_neps_decided": { "searcher_name": "bayesian_optimization", "searcher_alg": "bayesian_optimization", "user_defined_searcher": False, - "args_accepted_changes": None, + "searcher_args_user_modified": False, }, "pibo_neps_decided": { "searcher_name": "pibo", "searcher_alg": "bayesian_optimization", "user_defined_searcher": False, - "args_accepted_changes": False, + "searcher_args_user_modified": False, }, "hyperband_neps_decided": { "searcher_name": "hyperband", "searcher_alg": "hyperband", "user_defined_searcher": False, - "args_accepted_changes": False, + "searcher_args_user_modified": False, }, }