8e9a026bc34d8409faa572a7144c2d96a7c039ed,tests/models/test_hparams.py,SimpleNoArgsModel,test_step,#SimpleNoArgsModel#Any#Any#,545

Before Change


    def test_step(self, batch, batch_nb):
        x, y = batch
        loss = F.cross_entropy(self(x), y)
        return {"loss": loss, "log": {"train_loss": loss}}

    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters(), lr=0.02)

After Change




// -------------------------
// STANDARD TESTS
// -------------------------
def _run_standard_hparams_test(tmpdir, model, cls, try_overwrite=False):
    
    Tests for the existence of an arg "test_arg=14"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


Project Name: ray-project/ray
Commit Name: 1027bfd4b8ff9482d877521a094657aecb0fe3ac
Time: 2020-10-08
Author: amogkam@users.noreply.github.com
File Name: python/ray/tune/examples/mnist_pytorch_lightning.py
Class Name: LightningMNISTClassifier
Method Name: validation_epoch_end


Project Name: ray-project/ray
Commit Name: 1027bfd4b8ff9482d877521a094657aecb0fe3ac
Time: 2020-10-08
Author: amogkam@users.noreply.github.com
File Name: python/ray/tune/examples/mnist_pytorch_lightning.py
Class Name: LightningMNISTClassifier
Method Name: training_step