chainer / chainerrl

ChainerRL is a deep reinforcement learning library built on top of Chainer.
MIT License
1.18k stars 224 forks source link

TestSquashedGaussianDistribution.test_sample_with_log_prob is flaky #545

Closed muupan closed 5 years ago

muupan commented 5 years ago

https://travis-ci.org/chainer/chainerrl/jobs/578278226

self = <chainer.testing._bundle.TestSquashedGaussianDistribution_param_1_{ndim=2, batch_size=1} testMethod=test_sample_with_log_prob>
    def test_sample_with_log_prob(self):
        for i in range(10):
            y, log_prob = self.distrib.sample_with_log_prob()
            log_p = self.distrib.log_prob(y)
            np.testing.assert_almost_equal(
>               log_p.array, log_prob.array, decimal=5)
E           AssertionError: Parameterized test failed.
E           
E           Base test method: TestSquashedGaussianDistribution.test_sample_with_log_prob
E           Test parameters:
E             ndim: 2
E             batch_size: 1
E           
E           
E           (caused by)
E           AssertionError: 
E           Arrays are not almost equal to 5 decimals
E           
E           Mismatch: 100%
E           Max absolute difference: 5.9366226e-05
E           Max relative difference: 7.9166595e-05
E            x: array([0.74995], dtype=float32)
E            y: array([0.74989], dtype=float32)
tests/test_distribution.py:331: AssertionError
muupan commented 5 years ago

Let's reopen if the issue persists after #554.