5028ed1b6bedd526dee27ea731284f43e87303f0,fairseq/trainer.py,Trainer,train_step,#Trainer#Any#Any#,271
Before Change
metrics.log_scalar("oom", ooms, len(samples), priority=600, round=3)
if ooms == self.args.distributed_world_size * len(samples):
logger.warning("OOM in all workers, skipping update")
self.zero_grad()
return None
try:
After Change
if is_dummy_batch:
sample_size *= 0. // multiply by 0 to preserve device
if torch.is_tensor(sample_size):
sample_size = sample_size.float()
else:
sample_size = float(sample_size)
// gather logging outputs from all replicas
if self._sync_stats():
logging_outputs, (sample_size, ooms) = self._aggregate_logging_outputs(
logging_outputs, sample_size, ooms, ignore=is_dummy_batch,
)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: pytorch/fairseq
Commit Name: 5028ed1b6bedd526dee27ea731284f43e87303f0
Time: 2020-03-11
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: train_step
Project Name: dickreuter/Poker
Commit Name: 34aa81447b74b182fcfc419ba02e7e1cbed95292
Time: 2019-12-23
Author: 47919514+MikePlace1971@users.noreply.github.com
File Name: poker/table_analysers/table_screen_based.py
Class Name: TableScreenBased
Method Name: get_total_pot_value
Project Name: facebookresearch/Horizon
Commit Name: 38271c374558d7149a4573eacd4d49e2b9cd8089
Time: 2019-03-15
Author: chenz@instagram.com
File Name: ml/rl/training/_dqn_trainer.py
Class Name: _DQNTrainer
Method Name: train