From d52020872200e21a05c5ce44daa403c7b511fd3b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 01:37:32 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/estimagic/optimization/cyipopt_optimizers.py | 4 ---- src/estimagic/optimization/pygmo_optimizers.py | 7 ------- tests/estimation/test_estimate_msm.py | 1 - tests/optimization/test_ipopt_options.py | 2 -- tests/visualization/test_profile_plot.py | 9 --------- 5 files changed, 23 deletions(-) diff --git a/src/estimagic/optimization/cyipopt_optimizers.py b/src/estimagic/optimization/cyipopt_optimizers.py index 2bfa70afe..49f0755c4 100644 --- a/src/estimagic/optimization/cyipopt_optimizers.py +++ b/src/estimagic/optimization/cyipopt_optimizers.py @@ -35,7 +35,6 @@ def ipopt( dual_inf_tol=1.0, constr_viol_tol=0.0001, compl_inf_tol=0.0001, - # s_max=100.0, mu_target=0.0, # stopping criteria @@ -49,7 +48,6 @@ def ipopt( acceptable_constr_viol_tol=0.01, acceptable_compl_inf_tol=0.01, acceptable_obj_change_tol=1e20, - # diverging_iterates_tol=1e20, nlp_lower_bound_inf=-1e19, nlp_upper_bound_inf=1e19, @@ -334,7 +332,6 @@ def ipopt( "pardiso_msglvl": 0, # disable derivative checker "derivative_test": "none", - # "s_max": float(s_max), "max_iter": stopping_max_iterations, "max_wall_time": float(stopping_max_wall_time_seconds), @@ -492,7 +489,6 @@ def ipopt( # linear solver "linear_solver": linear_solver, **linear_solver_options, - # **converted_bool_to_str_options, } diff --git a/src/estimagic/optimization/pygmo_optimizers.py b/src/estimagic/optimization/pygmo_optimizers.py index 0044fa5df..755980391 100644 --- a/src/estimagic/optimization/pygmo_optimizers.py +++ b/src/estimagic/optimization/pygmo_optimizers.py @@ -39,7 +39,6 @@ def pygmo_gaco( n_cores=1, seed=None, discard_start_params=False, - # stopping_max_iterations=STOPPING_MAX_ITERATIONS_GENETIC, kernel_size=63, speed_parameter_q=1.0, @@ -493,7 +492,6 @@ def pygmo_cmaes( population_size=None, seed=None, discard_start_params=False, - # stopping_max_iterations=STOPPING_MAX_ITERATIONS_GENETIC, backward_horizon=None, variance_loss_compensation=None, @@ -562,7 +560,6 @@ def pygmo_simulated_annealing( population_size=None, seed=None, discard_start_params=False, - # start_temperature=10.0, end_temperature=0.01, n_temp_adjustments=10, @@ -868,7 +865,6 @@ def pygmo_xnes( population_size=None, seed=None, discard_start_params=False, - # stopping_max_iterations=STOPPING_MAX_ITERATIONS_GENETIC, learning_rate_mean_update=1.0, learning_rate_step_size_update=None, @@ -982,7 +978,6 @@ def pygmo_compass_search( population_size=None, seed=None, discard_start_params=False, - # stopping_max_criterion_evaluations=STOPPING_MAX_CRITERION_EVALUATIONS_GLOBAL, start_range=0.1, stop_range=0.01, @@ -1044,7 +1039,6 @@ def pygmo_ihs( population_size=None, seed=None, discard_start_params=False, - # stopping_max_iterations=STOPPING_MAX_ITERATIONS_GENETIC, choose_from_memory_probability=0.85, min_pitch_adjustment_rate=0.35, @@ -1109,7 +1103,6 @@ def pygmo_de1220( population_size=None, seed=None, discard_start_params=False, - # jde=True, stopping_max_iterations=STOPPING_MAX_ITERATIONS_GENETIC, allowed_variants=None, diff --git a/tests/estimation/test_estimate_msm.py b/tests/estimation/test_estimate_msm.py index 6461ef3a5..7a3f21421 100644 --- a/tests/estimation/test_estimate_msm.py +++ b/tests/estimation/test_estimate_msm.py @@ -82,7 +82,6 @@ def test_estimate_msm(simulate_moments, moments_cov, optimize_options): # works only because parameter point estimates are exactly zero aaae(calculated.p_values(), np.ones(3)) - # expected_ci_upper = np.array([1.95996398, 2.77180765, 3.3947572]) expected_ci_lower = -expected_ci_upper diff --git a/tests/optimization/test_ipopt_options.py b/tests/optimization/test_ipopt_options.py index fda82b8d8..3ee53fb29 100644 --- a/tests/optimization/test_ipopt_options.py +++ b/tests/optimization/test_ipopt_options.py @@ -17,7 +17,6 @@ {"dual_inf_tol": 2.5}, {"constr_viol_tol": 1e-7}, {"compl_inf_tol": 1e-7}, - # {"acceptable_iter": 15}, {"acceptable_tol": 1e-5}, {"acceptable_dual_inf_tol": 1e-5}, @@ -46,7 +45,6 @@ {"nlp_scaling_constr_target_gradient": 0}, {"nlp_scaling_constr_target_gradient": 2e-9}, {"nlp_scaling_min_value": 1e-9}, - # {"bound_push": 0.02}, {"bound_frac": 0.02}, {"slack_bound_push": 0.001}, diff --git a/tests/visualization/test_profile_plot.py b/tests/visualization/test_profile_plot.py index ff1cc393a..f0369ebb9 100644 --- a/tests/visualization/test_profile_plot.py +++ b/tests/visualization/test_profile_plot.py @@ -38,12 +38,9 @@ def test_create_solution_times_n_evaluations(): data=[ ["prob1", "algo1", 0], ["prob1", "algo1", 1], - # ["prob1", "algo2", 2], ["prob1", "algo2", 3], - # ["prob2", "algo1", 5], - # ["prob2", "algo2", 0], ["prob2", "algo2", 1], ], @@ -76,12 +73,9 @@ def test_create_solution_times_n_batches(): data=[ ["prob1", "algo1", 0], ["prob1", "algo1", 1], - # ["prob1", "algo2", 2], ["prob1", "algo2", 2], - # ["prob2", "algo1", 1], - # ["prob2", "algo2", 0], ["prob2", "algo2", 0], ], @@ -112,12 +106,9 @@ def test_create_solution_times_walltime(): data=[ ["prob1", "algo1", 0, 0], ["prob1", "algo1", 1, 1], - # ["prob1", "algo2", 2, 2], ["prob1", "algo2", 3, 3], - # ["prob2", "algo1", 5, 5], - # ["prob2", "algo2", 0, 0], ["prob2", "algo2", 1, 1], ],