a4f6690b9c4290a7f47761100523ff2ef5335964,tests/agents_tests/test_trpo.py,TestTRPO,_test_abc,#TestTRPO#Any#Any#Any#Any#,183

Before Change


        n_test_runs = 5
        for _ in range(n_test_runs):
            total_r = 0.0
            obs = test_env.reset()
            done = False
            reward = 0.0
            while not done:
                action = agent.act(obs)
                obs, reward, done, _ = test_env.step(action)
                total_r += reward
            agent.stop_episode()

            if require_success:
                self.assertAlmostEqual(total_r, successful_return)

After Change


        )
        if require_success:
            n_succeeded = np.sum(np.asarray(eval_returns) >= successful_return)
            self.assertEqual(n_succeeded, n_test_runs)

        // Save
        agent.save(self.agent_dirname)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: chainer/chainerrl
Commit Name: a4f6690b9c4290a7f47761100523ff2ef5335964
Time: 2019-04-28
Author: muupan@gmail.com
File Name: tests/agents_tests/test_trpo.py
Class Name: TestTRPO
Method Name: _test_abc


Project Name: facebookresearch/Horizon
Commit Name: 09e72f2042e26725632082d93df70cbc86071d38
Time: 2020-05-13
Author: kittipat@fb.com
File Name: reagent/gym/tests/preprocessors/test_replay_buffer_inserters.py
Class Name: TestBasicReplayBufferInserter
Method Name: test_cartpole


Project Name: reinforceio/tensorforce
Commit Name: da7009655b63c5d96be0039af421ab56de379ef1
Time: 2020-07-18
Author: alexkuhnle@t-online.de
File Name: test/test_features.py
Class Name: TestFeatures
Method Name: test_pretrain


Project Name: chainer/chainerrl
Commit Name: a4f6690b9c4290a7f47761100523ff2ef5335964
Time: 2019-04-28
Author: muupan@gmail.com
File Name: tests/agents_tests/test_trpo.py
Class Name: TestTRPO
Method Name: _test_abc