Skip to content

Commit

Permalink
Make slow tests pass for release
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Aug 30, 2022
1 parent 1b41b96 commit 619678a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tests/inference_on_device_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ def test_embedding_nets_integration_training_device(
num_transforms=2,
)
)
train_kwargs = dict(force_first_round_loss=True)
if inference_method == SNPE_A:
train_kwargs = dict()
else:
train_kwargs = dict(force_first_round_loss=True)

with pytest.raises(Exception) if prior_device != training_device else nullcontext():
inference = inference_method(prior=prior, **nn_kwargs, device=training_device)
Expand Down
2 changes: 1 addition & 1 deletion tests/linearGaussian_snle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_c2st_and_map_snl_on_linearGaussian_different(num_dim: int, prior_str: s
"""
num_samples = 500
num_simulations = 3000
num_simulations = 4500
trials_to_test = [1]

# likelihood_mean will be likelihood_shift+theta
Expand Down
2 changes: 1 addition & 1 deletion tests/linearGaussian_snre_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_c2st_sre_variants_on_linearGaussian(

x_o = zeros(num_trials, num_dim)
num_samples = 500
num_simulations = 2600 if num_trials == 1 else 40500
num_simulations = 3000 if num_trials == 1 else 40500

# `likelihood_mean` will be `likelihood_shift + theta`.
likelihood_shift = -1.0 * ones(num_dim)
Expand Down

0 comments on commit 619678a

Please sign in to comment.