8e9a026bc34d8409faa572a7144c2d96a7c039ed,tests/models/test_restore.py,,test_dp_resume,#Any#,342

Before Change


@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
def test_dp_resume(tmpdir):
    Make sure DP continues training correctly.
    hparams = EvalModelTemplate.get_default_hparams()
    model = EvalModelTemplate(**hparams)

    trainer_options = dict(max_epochs=1, gpus=2, accelerator="dp", default_root_dir=tmpdir)

    // get logger

After Change


            self.on_train_start_called = True

    // new model
    model = CustomModel()

    // fit new model which should load hpc weights
    new_trainer.fit(model)
    assert model.on_train_start_called
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: williamFalcon/pytorch-lightning
Commit Name: 8e9a026bc34d8409faa572a7144c2d96a7c039ed
Time: 2021-02-11
Author: rohitgr1998@gmail.com
File Name: tests/models/test_restore.py
Class Name:
Method Name: test_dp_resume


Project Name: williamFalcon/pytorch-lightning
Commit Name: d583d561690ea975ebd9ea41e1b7054495aa0bcb
Time: 2021-01-10
Author: rohitgr1998@gmail.com
File Name: tests/loggers/test_base.py
Class Name:
Method Name: test_multiple_loggers


Project Name: williamFalcon/pytorch-lightning
Commit Name: d583d561690ea975ebd9ea41e1b7054495aa0bcb
Time: 2021-01-10
Author: rohitgr1998@gmail.com
File Name: tests/loggers/test_base.py
Class Name:
Method Name: test_custom_logger