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


    @decorate
    def __init__(self, hparams, *my_args, **my_kwargs):
        super().__init__()
        self.hparams = hparams


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

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: masa-su/pixyz
Commit Name: e96869ca093debb15d60d3dfa28db81d57c8826f
Time: 2021-02-01
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistGraph
Method Name: get_log_prob


Project Name: masa-su/pixyz
Commit Name: ceae59a528d26dd4986a630f65304211018230d7
Time: 2021-01-31
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistGraph
Method Name: sample


Project Name: stellargraph/stellargraph
Commit Name: 429267c276222ec57fa622039cdcc033379d9f97
Time: 2019-02-06
Author: wangzhen263@gmail.com
File Name: stellargraph/layer/gcn.py
Class Name: GCN
Method Name: node_model


Project Name: rlworkgroup/garage
Commit Name: e4b6611cb73ef7658f028831be1aa6bd85ecbed0
Time: 2020-08-14
Author: 38871737+avnishn@users.noreply.github.com
File Name: src/garage/torch/policies/deterministic_mlp_policy.py
Class Name: DeterministicMLPPolicy
Method Name: get_action