6453091b8ab3713e2d58bad7acc9a4345dc5d10b,pytorch_lightning/metrics/compositional.py,CompositionalMetric,__init__,#CompositionalMetric#Any#Any#Any#,14

Before Change


        else:
            self.metric_a = metric_a

        if isinstance(metric_b, torch.Tensor):
            self.register_buffer("metric_b", metric_b)
        else:
            self.metric_b = metric_b

    def _sync_dist(self, dist_sync_fn=None):
        // No syncing required here. syncing will be done in metric_a and metric_b
        pass

After Change


        metric_a: Union[Metric, int, float, torch.Tensor],
        metric_b: Union[Metric, int, float, torch.Tensor, None],
    ):
        rank_zero_warn(
            "This `Metric` was deprecated since v1.3.0 in favor of `torchmetrics.Metric`."
            " It will be removed in v1.5.0", DeprecationWarning
        )
        super().__init__(operator=operator, metric_a=metric_a, metric_b=metric_b)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: williamFalcon/pytorch-lightning
Commit Name: 6453091b8ab3713e2d58bad7acc9a4345dc5d10b
Time: 2021-03-15
Author: Borda@users.noreply.github.com
File Name: pytorch_lightning/metrics/compositional.py
Class Name: CompositionalMetric
Method Name: __init__


Project Name: williamFalcon/pytorch-lightning
Commit Name: 6453091b8ab3713e2d58bad7acc9a4345dc5d10b
Time: 2021-03-15
Author: Borda@users.noreply.github.com
File Name: pytorch_lightning/metrics/metric.py
Class Name: MetricCollection
Method Name: __init__


Project Name: williamFalcon/pytorch-lightning
Commit Name: 221c4a0ba261e4a499303aa9d9f63da63e65daee
Time: 2021-01-27
Author: skaftenicki@gmail.com
File Name: pytorch_lightning/metrics/functional/classification.py
Class Name:
Method Name: auc