From 39498bba8e50fbd4370e5ef1d3fa196e26fee551 Mon Sep 17 00:00:00 2001 From: Hu Zhao <zhao@mbd.rwth-aachen.de> Date: Fri, 28 Oct 2022 18:15:46 +0200 Subject: [PATCH] test: update test for active learning --- tests/test_active_learning.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tests/test_active_learning.py b/tests/test_active_learning.py index 06d9fbb..9508a09 100644 --- a/tests/test_active_learning.py +++ b/tests/test_active_learning.py @@ -32,11 +32,9 @@ def test_ActiveLearning_init_TypeError(run_sim_obj, prior, likelihood, ndim = 1 bounds = np.array([[0,1]]) data = np.array([1,2,3]) - n0 = 20 - nt = 100 with pytest.raises(BeartypeCallHintParamViolation): _ = ActiveLearning(ndim, bounds, data, run_sim_obj, prior, likelihood, - n0, nt, lhs_sampler, scalar_gasp, optimizer=optimizer) + lhs_sampler, scalar_gasp, optimizer=optimizer) @pytest.mark.parametrize( @@ -59,11 +57,9 @@ def test_ActiveLearning_init_RuntimeError(run_sim_obj, lhs_sampler, data = np.array([1,2,3]) prior = uniform.pdf likelihood = norm.pdf - n0 = 20 - nt = 100 with pytest.raises(RuntimeError): _ = ActiveLearning(ndim, bounds, data, run_sim_obj, prior, likelihood, - n0, nt, lhs_sampler, scalar_gasp) + lhs_sampler, scalar_gasp) @pytest.mark.parametrize( @@ -82,11 +78,9 @@ def test_ActiveLearning_init_NotImplementedError(scalar_gasp_mean, indicator): scalar_gasp = ScalarGaSP(1) prior = uniform.pdf likelihood = norm.pdf - n0 = 20 - nt = 100 with pytest.raises(NotImplementedError): _ = ActiveLearning(ndim, bounds, data, run_sim_obj, prior, likelihood, - n0, nt, lhs_sampler, scalar_gasp, scalar_gasp_mean=scalar_gasp_mean, + lhs_sampler, scalar_gasp, scalar_gasp_mean=scalar_gasp_mean, indicator=indicator) def test_ActiveLearning_init_ValueError(): @@ -98,9 +92,7 @@ def test_ActiveLearning_init_ValueError(): scalar_gasp = ScalarGaSP(1) prior = uniform.pdf likelihood = norm.pdf - n0 = 20 - nt = 100 kwgs_optimizer = {"NS":50} with pytest.raises(ValueError): _ = ActiveLearning(ndim, bounds, data, run_sim_obj, prior, likelihood, - n0, nt, lhs_sampler, scalar_gasp, kwgs_optimizer=kwgs_optimizer) + lhs_sampler, scalar_gasp, kwgs_optimizer=kwgs_optimizer) -- GitLab