1027bfd4b8ff9482d877521a094657aecb0fe3ac,python/ray/tune/examples/mnist_pytorch_lightning.py,LightningMNISTClassifier,validation_epoch_end,#LightningMNISTClassifier#Any#,91

Before Change


        avg_acc = torch.stack([x["val_accuracy"] for x in outputs]).mean()
        logs = {"ptl/val_loss": avg_loss, "ptl/val_accuracy": avg_acc}

        return {
            "val_loss": avg_loss,
            "val_accuracy": avg_acc,
            "log": logs
        }

    @staticmethod
    def download_data(data_dir):
        transform = transforms.Compose([

After Change


    def validation_epoch_end(self, outputs):
        avg_loss = torch.stack([x["val_loss"] for x in outputs]).mean()
        avg_acc = torch.stack([x["val_accuracy"] for x in outputs]).mean()
        self.log("ptl/val_loss", avg_loss)
        self.log("ptl/val_accuracy", avg_acc)


    @staticmethod
    def download_data(data_dir):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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: 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


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