29bcf309848b9c5ff95ab0d6dd0f12b7ae28f9b4,tests/core/test_datamodules.py,,test_full_loop_single_gpu,#Any#,324
Before Change
// test
result = trainer.test(datamodule=dm)
result = result[0]
assert result["test_acc"] > 0.8
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
def test_full_loop_dp(tmpdir):
After Change
def test_full_loop_single_gpu(tmpdir):
reset_seed()
dm = BoringDataModule()
model = BoringModel()
trainer = Trainer(
default_root_dir=tmpdir,
max_epochs=1,
weights_summary=None,
gpus=1,
deterministic=True,
)
// fit model
result = trainer.fit(model, dm)
assert trainer.state == TrainerState.FINISHED, f"Training failed with {trainer.state}"
assert result
// test
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 3
Instances
Project Name: williamFalcon/pytorch-lightning
Commit Name: 29bcf309848b9c5ff95ab0d6dd0f12b7ae28f9b4
Time: 2021-01-12
Author: rohitgr1998@gmail.com
File Name: tests/core/test_datamodules.py
Class Name:
Method Name: test_full_loop_single_gpu
Project Name: williamFalcon/pytorch-lightning
Commit Name: 29bcf309848b9c5ff95ab0d6dd0f12b7ae28f9b4
Time: 2021-01-12
Author: rohitgr1998@gmail.com
File Name: tests/core/test_datamodules.py
Class Name:
Method Name: test_full_loop
Project Name: williamFalcon/pytorch-lightning
Commit Name: 29bcf309848b9c5ff95ab0d6dd0f12b7ae28f9b4
Time: 2021-01-12
Author: rohitgr1998@gmail.com
File Name: tests/core/test_datamodules.py
Class Name:
Method Name: test_train_loop_only
Project Name: williamFalcon/pytorch-lightning
Commit Name: 29bcf309848b9c5ff95ab0d6dd0f12b7ae28f9b4
Time: 2021-01-12
Author: rohitgr1998@gmail.com
File Name: tests/core/test_datamodules.py
Class Name:
Method Name: test_train_val_loop_only
Project Name: williamFalcon/pytorch-lightning
Commit Name: 29bcf309848b9c5ff95ab0d6dd0f12b7ae28f9b4
Time: 2021-01-12
Author: rohitgr1998@gmail.com
File Name: tests/core/test_datamodules.py
Class Name:
Method Name: test_full_loop_dp