bafeed46fb76fa337a771ebb41d65bb95039565a,fairseq/trainer.py,Trainer,train_step,#Trainer#Any#Any#Any#,261

Before Change


                    // printed out if another exception happens.
                    // NB(jerry): added a flush to mitigate this
                    print(msg, file=sys.stderr)
                    if torch.cuda.is_available() and hasattr(torch.cuda, "memory_summary"):
                        for device_idx in range(torch.cuda.device_count()):
                            print(torch.cuda.memory_summary(device=device_idx),
                                  file=sys.stderr)
                    sys.stderr.flush()

After Change


                if "out of memory" in str(e):
                    self._log_oom(e)
                    if raise_oom:
                        raise e
                    print("| WARNING: attempting to recover from OOM in forward/backward pass",
                          file=sys.stderr)
                    ooms += 1
                    self.zero_grad()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: elbayadm/attn2d
Commit Name: bafeed46fb76fa337a771ebb41d65bb95039565a
Time: 2019-11-06
Author: noreplyspamblackhole@gmail.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: train_step


Project Name: elbayadm/attn2d
Commit Name: bafeed46fb76fa337a771ebb41d65bb95039565a
Time: 2019-11-06
Author: noreplyspamblackhole@gmail.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: train_step


Project Name: ultralytics/yolov3
Commit Name: af0033c9e96a4a8dcc04f8fd737d0ccad3364f10
Time: 2018-11-29
Author: glenn.jocher@ultralytics.com
File Name: train.py
Class Name:
Method Name: main