Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestCastObservation.test_cast_observation is flaky #542

Open
muupan opened this issue Aug 28, 2019 · 0 comments
Open

TestCastObservation.test_cast_observation is flaky #542

muupan opened this issue Aug 28, 2019 · 0 comments

Comments

@muupan
Copy link
Member

muupan commented Aug 28, 2019

______________ TestCastObservation_param_0.test_cast_observation _______________
self = <chainer.testing.parameterized.TestCastObservation_param_0 testMethod=test_cast_observation>
    def test_cast_observation(self):
        env = chainerrl.wrappers.CastObservation(
            gym.make(self.env_id), dtype=self.dtype)
        rtol = 1e-3 if self.dtype == np.float16 else 1e-7
    
        obs = env.reset()
        self.assertEqual(env.original_observation.dtype, np.float64)
        self.assertEqual(obs.dtype, self.dtype)
>       np.testing.assert_allclose(env.original_observation, obs, rtol=rtol)
E       AssertionError: Parameterized test failed.
E       
E       Base test method: TestCastObservation.test_cast_observation
E       Test parameters:
E         dtype: <class 'numpy.float16'>
E         env_id: CartPole-v1
E       
E       AssertionError: 
E       Not equal to tolerance rtol=0.001, atol=0
E       
E       Mismatch: 25%
E       Max absolute difference: 1.0772385e-05
E       Max relative difference: 0.0021301
E        x: array([-3.641746e-02, -1.314095e-05, -3.944846e-02, -3.614351e-03])
E        y: array([-3.641e-02, -1.311e-05, -3.946e-02, -3.614e-03], dtype=float16)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant