415be78cc0d1275a29d0ceda550d0d7a7a5224ea,python/ray/util/sgd/tests/test_torch.py,,test_dead_trainer,#Any#,98
Before Change
def test_dead_trainer(ray_start_2_cpus): // noqa: F811
trainer = TorchTrainer(
model_creator=model_creator,
data_creator=data_creator,
optimizer_creator=optimizer_creator,
loss_creator=lambda config: nn.MSELoss(),
num_workers=2)
trainer.train(num_steps=1)
trainer.shutdown()
with pytest.raises(RuntimeError):
trainer.train()
After Change
def test_dead_trainer(ray_start_2_cpus): // noqa: F811
TestOperator = get_test_operator(Operator)
trainer = TorchTrainer(training_operator_cls=TestOperator, num_workers=2)
trainer.train(num_steps=1)
trainer.shutdown()
with pytest.raises(RuntimeError):
trainer.train()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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.py
Class Name:
Method Name: test_dead_trainer
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.py
Class Name:
Method Name: test_multi_model
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.py
Class Name:
Method Name: test_multi_model_matrix