Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roussel-ryan committed Sep 30, 2023
1 parent 2b07505 commit e182f9d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
5 changes: 0 additions & 5 deletions tests/generators/bayesian/test_bax.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def test_generate(self):
vocs=test_vocs,
algorithm=alg,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.data = TEST_VOCS_DATA

Expand All @@ -128,7 +127,6 @@ def test_generate(self):
vocs=test_vocs,
algorithm=alg,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.data = TEST_VOCS_DATA

Expand All @@ -143,7 +141,6 @@ def test_cuda(self):
)

if torch.cuda.is_available():
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.data = TEST_VOCS_DATA

Expand All @@ -158,7 +155,6 @@ def test_in_xopt(self):
vocs=TEST_VOCS_BASE,
algorithm=alg,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1

xopt = Xopt(generator=gen, evaluator=evaluator, vocs=TEST_VOCS_BASE)
Expand All @@ -174,7 +170,6 @@ def test_file_saving(self):
gen = BaxGenerator(
vocs=TEST_VOCS_BASE, algorithm=alg, algorithm_results_file="test"
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1

xopt = Xopt(generator=gen, evaluator=evaluator, vocs=TEST_VOCS_BASE)
Expand Down
3 changes: 0 additions & 3 deletions tests/generators/bayesian/test_bayesian_exploration.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def test_generate(self):
gen = BayesianExplorationGenerator(
vocs=ele,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -34,7 +33,6 @@ def test_generate(self):
gen = BayesianExplorationGenerator(
vocs=ele,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -47,7 +45,6 @@ def test_generate(self):
def test_in_xopt(self):
evaluator = Evaluator(function=xtest_callable)
gen = BayesianExplorationGenerator(vocs=TEST_VOCS_BASE)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand Down
3 changes: 0 additions & 3 deletions tests/generators/bayesian/test_expected_improvement.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def test_generate(self):
gen = ExpectedImprovementGenerator(
vocs=TEST_VOCS_BASE,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -38,7 +37,6 @@ def test_generate_w_overlapping_objectives_constraints(self):
gen = ExpectedImprovementGenerator(
vocs=test_vocs,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -51,7 +49,6 @@ def test_in_xopt(self):
gen = ExpectedImprovementGenerator(
vocs=TEST_VOCS_BASE,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1

Expand Down
5 changes: 0 additions & 5 deletions tests/generators/bayesian/test_high_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def test_constrained_mobo(self):
numerical_optimizer:
name: LBFGS
n_restarts: 1
n_raw_samples: 2
evaluator:
function: xopt.resources.test_functions.tnk.evaluate_TNK
Expand All @@ -74,7 +73,6 @@ def test_mobo(self):
numerical_optimizer:
name: LBFGS
n_restarts: 2
n_raw_samples: 2
evaluator:
function: xopt.resources.test_functions.tnk.evaluate_TNK
vocs:
Expand All @@ -100,7 +98,6 @@ def test_restart_torch_inline_serialization(self):
numerical_optimizer:
name: LBFGS
n_restarts: 1
n_raw_samples: 2
evaluator:
function: xopt.resources.test_functions.tnk.evaluate_TNK
vocs:
Expand Down Expand Up @@ -148,7 +145,6 @@ def test_restart_torch_serialization(self):
numerical_optimizer:
name: LBFGS
n_restarts: 1
n_raw_samples: 2
evaluator:
function: xopt.resources.test_functions.tnk.evaluate_TNK
vocs:
Expand Down Expand Up @@ -193,7 +189,6 @@ def test_restart(self):
numerical_optimizer:
name: LBFGS
n_restarts: 1
n_raw_samples: 2
evaluator:
function: xopt.resources.test_functions.tnk.evaluate_TNK
Expand Down
1 change: 0 additions & 1 deletion tests/generators/bayesian/test_multi_fidelity.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def test_generation(self):

generator = MultiFidelityGenerator(vocs=vocs)
generator.numerical_optimizer.n_restarts = 1
generator.numerical_optimizer.n_raw_samples = 1

generator.add_data(data)

Expand Down
4 changes: 0 additions & 4 deletions tests/generators/bayesian/test_upper_confidence_bound.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def test_generate(self):
gen = UpperConfidenceBoundGenerator(
vocs=TEST_VOCS_BASE,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -44,7 +43,6 @@ def test_cuda(self):

if torch.cuda.is_available():
gen.use_cuda = True
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -58,7 +56,6 @@ def test_generate_w_overlapping_objectives_constraints(self):
gen = UpperConfidenceBoundGenerator(
vocs=test_vocs,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1
gen.data = TEST_VOCS_DATA
Expand All @@ -71,7 +68,6 @@ def test_in_xopt(self):
gen = UpperConfidenceBoundGenerator(
vocs=TEST_VOCS_BASE,
)
gen.numerical_optimizer.n_raw_samples = 1
gen.numerical_optimizer.n_restarts = 1
gen.n_monte_carlo_samples = 1

Expand Down

0 comments on commit e182f9d

Please sign in to comment.