87a61ad92a9e0129e5c81c242f0ea96d77e6b0af,allennlp/training/metrics/attachment_scores.py,AttachmentScores,__call__,#AttachmentScores#Any#Any#Any#Any#Any#,36
Before Change
if is_distributed():
_total_sentences = torch.tensor(self._total_sentences).to(device)
_total_words = torch.tensor(self._total_words).to(device)
dist.all_reduce(_total_sentences, op=dist.ReduceOp.SUM)
dist.all_reduce(_total_words, op=dist.ReduceOp.SUM)
self._total_sentences = _total_sentences.item()
self._total_words = _total_words.item()
After Change
dist.all_reduce(unlabeled_exact_match, op=dist.ReduceOp.SUM)
dist.all_reduce(correct_labels_and_indices, op=dist.ReduceOp.SUM)
dist.all_reduce(labeled_exact_match, op=dist.ReduceOp.SUM)
total_sentences = torch.tensor(total_sentences).to(device)
total_words = torch.tensor(total_words).to(device)
dist.all_reduce(total_sentences, op=dist.ReduceOp.SUM)
dist.all_reduce(total_words, op=dist.ReduceOp.SUM)
total_sentences = total_sentences.item()
total_words = total_words.item()
self._unlabeled_correct += correct_indices.sum()
self._exact_unlabeled_correct += unlabeled_exact_match.sum()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: allenai/allennlp
Commit Name: 87a61ad92a9e0129e5c81c242f0ea96d77e6b0af
Time: 2020-08-19
Author: akshita23bhagia@gmail.com
File Name: allennlp/training/metrics/attachment_scores.py
Class Name: AttachmentScores
Method Name: __call__
Project Name: ray-project/ray
Commit Name: d0fab84e4dfdddc64cb4275ff98cf67f84ff86a0
Time: 2020-04-16
Author: sven@anyscale.io
File Name: rllib/utils/framework.py
Class Name:
Method Name: get_variable
Project Name: OpenNMT/OpenNMT-py
Commit Name: 5eceaf2bf1582d7851ffb53806d864b91955bb2c
Time: 2018-10-24
Author: guillaume.klein@systrangroup.com
File Name: onmt/translate/translator.py
Class Name: Translator
Method Name: _fast_translate_batch
Project Name: deepchem/deepchem
Commit Name: 60a12f60fdddd77d76120ba6e062291d737940ad
Time: 2020-09-01
Author: nd.12021218@gmail.com
File Name: deepchem/models/torch_models/torch_model.py
Class Name: TorchModel
Method Name: __init__