Skip to content

Commit

Permalink
Fix test failures due to old change_flags API
Browse files Browse the repository at this point in the history
Breakage was caused by this:
<pymc-devs/pytensor@936554c>
Fix is to unpack the dict into kwargs.
  • Loading branch information
maresb authored and ricardoV94 committed Aug 24, 2024
1 parent 9b7e759 commit 68a7578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/sampling/test_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def test_step_vars_in_model(self):
class TestType:
samplers = (Metropolis, Slice, HamiltonianMC, NUTS)

@pytensor.config.change_flags({"floatX": "float64", "warn_float64": "ignore"})
@pytensor.config.change_flags(floatX="float64", warn_float64="ignore")
def test_float64(self):
with pm.Model() as model:
x = pm.Normal("x", initval=np.array(1.0, dtype="float64"))
Expand All @@ -861,7 +861,7 @@ def test_float64(self):
warnings.filterwarnings("ignore", ".*number of samples.*", UserWarning)
pm.sample(draws=10, tune=10, chains=1, step=sampler())

@pytensor.config.change_flags({"floatX": "float32", "warn_float64": "warn"})
@pytensor.config.change_flags(floatX="float32", warn_float64="warn")
def test_float32(self):
with pm.Model() as model:
x = pm.Normal("x", initval=np.array(1.0, dtype="float32"))
Expand Down

0 comments on commit 68a7578

Please sign in to comment.