415be78cc0d1275a29d0ceda550d0d7a7a5224ea,python/ray/util/sgd/tests/test_torch_runner.py,TestTorchRunner,testGivens,#TestTorchRunner#,97

Before Change


            ]
            return opts[0], opts[1], opts[2]

        runner = TorchRunner(
            three_model_creator,
            single_loader,
            three_optimizer_creator,
            loss_creator,
            training_operator_cls=MockOperator)
        runner.setup()

        self.assertEqual(len(runner.given_models), 3)
        self.assertEqual(len(runner.given_optimizers), 3)

After Change


        self.assertEqual(len(runner.given_models), 3)
        self.assertEqual(len(runner.given_optimizers), 3)

        runner2 = TorchRunner(training_operator_cls=self.Operator)
        runner2.setup_operator()

        self.assertNotEqual(runner2.given_models, runner2.models)
        self.assertNotEqual(runner2.given_optimizers, runner2.optimizers)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: ray-project/ray
Commit Name: 415be78cc0d1275a29d0ceda550d0d7a7a5224ea
Time: 2020-09-08
Author: amogkam@users.noreply.github.com
File Name: python/ray/util/sgd/tests/test_torch_runner.py
Class Name: TestTorchRunner
Method Name: testGivens


Project Name: ray-project/ray
Commit Name: 415be78cc0d1275a29d0ceda550d0d7a7a5224ea
Time: 2020-09-08
Author: amogkam@users.noreply.github.com
File Name: python/ray/util/sgd/tests/test_torch_runner.py
Class Name: TestTorchRunner
Method Name: testtrain_epoch


Project Name: ray-project/ray
Commit Name: 415be78cc0d1275a29d0ceda550d0d7a7a5224ea
Time: 2020-09-08
Author: amogkam@users.noreply.github.com
File Name: python/ray/util/sgd/tests/test_torch_runner.py
Class Name: TestTorchRunner
Method Name: testValidate


Project Name: ray-project/ray
Commit Name: 415be78cc0d1275a29d0ceda550d0d7a7a5224ea
Time: 2020-09-08
Author: amogkam@users.noreply.github.com
File Name: python/ray/util/sgd/tests/test_torch_runner.py
Class Name: TestTorchRunner
Method Name: testMultiLoaders