81314143ebce027d36f51e32bb281721b60a7100,rllib/agents/pg/tests/test_pg.py,TestPG,test_pg_compilation,#TestPG#,30

Before Change


        config["num_workers"] = 0  // Run locally.

        // tf.
        trainer = pg.PGTrainer(config=config, env="CartPole-v0")

        num_iterations = 2
        for i in range(num_iterations):
            trainer.train()

        // Torch.
        config["use_pytorch"] = True
        trainer = pg.PGTrainer(config=config, env="CartPole-v0")
        for i in range(num_iterations):
            trainer.train()

After Change


        config["num_workers"] = 0  // Run locally.
        num_iterations = 2

        for _ in framework_iterator(config):
            trainer = pg.PGTrainer(config=config, env="CartPole-v0")
            for i in range(num_iterations):
                trainer.train()

    def test_pg_loss_functions(self):
        Tests the PG loss function math.
        config = pg.DEFAULT_CONFIG.copy()
        config["num_workers"] = 0  // Run locally.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: ray-project/ray
Commit Name: 81314143ebce027d36f51e32bb281721b60a7100
Time: 2020-04-07
Author: sven@anyscale.io
File Name: rllib/agents/pg/tests/test_pg.py
Class Name: TestPG
Method Name: test_pg_compilation


Project Name: ray-project/ray
Commit Name: 1d4823c0ec446e93d00df8ca654db4b45b63b3d4
Time: 2020-04-03
Author: sven@anyscale.io
File Name: rllib/agents/dqn/tests/test_dqn.py
Class Name: TestDQN
Method Name: test_dqn_compilation


Project Name: ray-project/ray
Commit Name: 1d4823c0ec446e93d00df8ca654db4b45b63b3d4
Time: 2020-04-03
Author: sven@anyscale.io
File Name: rllib/agents/ppo/tests/test_ppo.py
Class Name: TestPPO
Method Name: test_ppo_compilation