Commit 9020c956 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

set more explicit seeds

parent c945025d
Pipeline #71179 passed with stages
in 16 minutes and 44 seconds
......@@ -124,9 +124,11 @@ def testPoissonian(field):
def test_bernoulli(field):
if isinstance(field.domain, ift.MultiDomain):
return
ift.random.push_sseq_from_seed(42)
field = field.sigmoid()
space = field.domain
d = ift.random.current_rng().binomial(1, 0.1, size=space.shape)
d = ift.Field(space, d)
energy = ift.BernoulliEnergy(d)
ift.extra.check_jacobian_consistency(energy, field, tol=1e-5)
ift.random.pop_sseq()
......@@ -119,6 +119,7 @@ def test_rosenbrock(minimizer):
from scipy.optimize import rosen, rosen_der, rosen_hess_prod
except ImportError:
raise SkipTest
ift.random.push_sseq_from_seed(42)
space = ift.DomainTuple.make(ift.UnstructuredDomain((2,)))
starting_point = ift.Field.from_random('normal', domain=space)*10
......@@ -170,6 +171,7 @@ def test_rosenbrock(minimizer):
assert_equal(convergence, IC.CONVERGED)
assert_allclose(energy.position.val, 1., rtol=1e-3, atol=1e-3)
ift.random.pop_sseq()
@pmp('minimizer', minimizers + slow_minimizers)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment