3441307d09545ca741396122e2ce83d56c7fcebc,test/test_parameters.py,TestParameters,float_unittest,#TestParameters#Any#,26

Before Change


        if not isinstance(exploration, dict) or exploration["type"] == "constant":
            actions, exploration_output2 = agent.act(states=states, query="exploration")
            self.assertEqual(exploration_output2, exploration_output1)
            states, terminal, reward = environment.execute(actions=actions)
            agent.observe(terminal=terminal, reward=reward)

        else:
            actions, exploration_output2 = agent.act(states=states, query="exploration")
            self.assertNotEqual(exploration_output2, exploration_output1)
            states, terminal, reward = environment.execute(actions=actions)
            agent.observe(terminal=terminal, reward=reward)

        exploration_input = 0.5
        actions, exploration_output = agent.act(
            states=states, query="exploration", exploration=exploration_input
        )
        self.assertEqual(exploration_output, exploration_input)

        agent.close()
        environment.close()

After Change


        actions = agent.act(states=states)
        exploration2 = agent.model.exploration.value().numpy().item()
        if not isinstance(exploration, dict) or exploration["type"] == "constant":
            self.assertEqual(exploration2, exploration1)
        else:
            self.assertNotEqual(exploration2, exploration1)
        states, terminal, reward = environment.execute(actions=actions)
        agent.observe(terminal=terminal, reward=reward)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: reinforceio/tensorforce
Commit Name: 3441307d09545ca741396122e2ce83d56c7fcebc
Time: 2020-05-06
Author: alexkuhnle@t-online.de
File Name: test/test_parameters.py
Class Name: TestParameters
Method Name: float_unittest


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


Project Name: reinforceio/tensorforce
Commit Name: 3441307d09545ca741396122e2ce83d56c7fcebc
Time: 2020-05-06
Author: alexkuhnle@t-online.de
File Name: test/test_parameters.py
Class Name: TestParameters
Method Name: float_unittest