Skip to content

Commit

Permalink
Repair change_flags reference and remove pytest.mark.run decorators
Browse files Browse the repository at this point in the history
We do not have pytest-ordering in the dependencies and tests should be unordered anyway.
  • Loading branch information
michaelosthege committed Jan 19, 2021
1 parent ca755f3 commit 3a8892a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pymc3/tests/test_variational_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def test_elbo():

# Create variational gradient tensor
mean_field = MeanField(model=model)
with pm.theanof.change_flags(compute_test_value="off"):
with theano.config.change_flags(compute_test_value="off"):
elbo = -pm.operators.KL(mean_field)()(10000)

mean_field.shared_params["mu"].set_value(post_mu)
Expand Down Expand Up @@ -732,7 +732,6 @@ def fit_kwargs(inference, use_minibatch):
return _select[(type(inference), key)]


@pytest.mark.run("first")
def test_fit_oo(inference, fit_kwargs, simple_model_data):
trace = inference.fit(**fit_kwargs).sample(10000)
mu_post = simple_model_data["mu_post"]
Expand Down Expand Up @@ -911,7 +910,6 @@ def binomial_model_inference(binomial_model, inference_spec):
return inference_spec()


@pytest.mark.run(after="test_sample_replacements")
def test_replacements(binomial_model_inference):
d = tt.bscalar()
d.tag.test_value = 1
Expand Down

0 comments on commit 3a8892a

Please sign in to comment.