a644060daa4c22aabedcfd9b891d43f9afa88f97,rllib/utils/experimental_dsl.py,CollectMetrics,__call__,#CollectMetrics#Any#,268

Before Change


    def __call__(self, _):
        metrics = LocalIterator.get_metrics()
        if metrics.parent_metrics:
            raise ValueError("TODO: support nested metrics")
        episodes, self.to_be_collected = collect_episodes(
            self.workers.local_worker(),
            self.workers.remote_workers(),
            self.to_be_collected,

After Change


        info = {}
        for metrics in all_metrics:
            info.update(metrics.info)
            for k, counter in metrics.counters.items():
                counters[k] = counter
            for k, timer in metrics.timers.items():
                timers["{}_time_ms".format(k)] = round(timer.mean * 1000, 3)
                if timer.has_units_processed():
                    timers["{}_throughput".format(k)] = round(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ray-project/ray
Commit Name: a644060daa4c22aabedcfd9b891d43f9afa88f97
Time: 2020-03-07
Author: ekhliang@gmail.com
File Name: rllib/utils/experimental_dsl.py
Class Name: CollectMetrics
Method Name: __call__


Project Name: google/tangent
Commit Name: 31269a5197170026985db35c4703cc6e9c805ebf
Time: 2017-11-10
Author: bart.vanmerrienboer@gmail.com
File Name: tangent/reverse_ad.py
Class Name: ReverseAD
Method Name: visit_Call


Project Name: dmlc/gluon-nlp
Commit Name: b1b61d3f90cf795c7b48b6d109db7b7b96fa21ff
Time: 2019-08-04
Author: lausen@amazon.com
File Name: src/gluonnlp/model/attention_cell.py
Class Name: MultiHeadAttentionCell
Method Name: __init__