From 59ee5782d003571e8847eef766a86f33ad6cc6a1 Mon Sep 17 00:00:00 2001 From: "Bryan M. Li" Date: Wed, 13 Mar 2024 16:23:29 +0000 Subject: [PATCH] clean test_torch and set seed --- tests/test_torch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_torch.py b/tests/test_torch.py index f90b545e..a0521444 100644 --- a/tests/test_torch.py +++ b/tests/test_torch.py @@ -5,8 +5,6 @@ from autoemulate.emulators import NeuralNetTorch from autoemulate.utils import set_random_seed -set_random_seed(1234) - def test_nn_torch_initialisation(): nn_torch = NeuralNetTorch() @@ -119,6 +117,7 @@ def test_nn_torch_module_ui(): def test_nn_torch_module_ui_param_search_random(): + set_random_seed(1234) input_size, output_size = 10, 2 X = np.random.rand(100, input_size) y = np.random.rand(100, output_size) @@ -136,6 +135,7 @@ def test_nn_torch_module_ui_param_search_random(): def test_nn_torch_module_ui_param_search_bayes(): + set_random_seed(1234) input_size, output_size = 10, 2 X = np.random.rand(10, input_size) y = np.random.rand(10, output_size)