Line too long (82 > 79 characters):
28 Given a list/numpy array/Tensor of metrics, computes the worst-case metricLine too long (80 > 79 characters):
40 Used to name the key in the results dictionaries returned by the metric.Line too long (83 > 79 characters):
47 The name of the key in the results dictionary returned by Metric.compute().Line too long (92 > 79 characters):
48 This should correspond to the aggregate metric computed on all of y_pred and y_true,Line too long (90 > 79 characters):
81 - return_dict (bool): Whether to return the output as a dictionary or a tensorLine too long (88 > 79 characters):
83 - metric (0-dim tensor): metric. If the inputs are empty, returns tensor(0.)Line too long (98 > 79 characters):
85 - results (dict): Dictionary of results, mapping metric.agg_metric_field to avg_metricLine too long (80 > 79 characters):
99 def compute_group_wise(self, y_pred, y_true, g, n_groups, return_dict=True):Line too long (90 > 79 characters):
107 - return_dict (bool): Whether to return the output as a dictionary or a tensorLine too long (109 > 79 characters):
109 - group_metrics (Tensor): tensor of size (n_groups, ) including the average metric for each groupLine too long (90 > 79 characters):
110 - group_counts (Tensor): tensor of size (n_groups, ) including the group countLine too long (111 > 79 characters):
116 group_metrics, group_counts, worst_group_metric = self._compute_group_wise(y_pred, y_true, g, n_groups)Line too long (93 > 79 characters):
120 results[self.group_metric_field(group_idx)] = group_metrics[group_idx].item()Line too long (91 > 79 characters):
121 results[self.group_count_field(group_idx)] = group_counts[group_idx].item()Line too long (82 > 79 characters):
163 Given a list/numpy array/Tensor of metrics, computes the worst-case metricLine too long (88 > 79 characters):
186 group_metrics, group_counts = avg_over_groups(element_wise_metrics, g, n_groups)Line too long (83 > 79 characters):
193 The name of the key in the results dictionary returned by Metric.compute().Line too long (90 > 79 characters):
203 - return_dict (bool): Whether to return the output as a dictionary or a tensorLine too long (96 > 79 characters):
207 - results (dict): Dictionary of results, mapping metric.name to element_wise_metricsLine too long (89 > 79 characters):
212 assert element_wise_metrics.dim()==1 and element_wise_metrics.numel()==batch_sizeLine too long (88 > 79 characters):
219 flattened_metrics = self.compute_element_wise(y_pred, y_true, return_dict=False)Line too long (88 > 79 characters):
232 flattened_metrics, _ = self.compute_flattened(y_pred, y_true, return_dict=False)Line too long (94 > 79 characters):
239 flattened_metrics, indices = self.compute_flattened(y_pred, y_true, return_dict=False)Line too long (95 > 79 characters):
241 group_metrics, group_counts = avg_over_groups(flattened_metrics, flattened_g, n_groups)Line too long (87 > 79 characters):
252 flattened_metrics = self._compute_flattened(flattened_y_pred, flattened_y_true)Missing whitespace around operator (in 2 places):
212 assert element_wise_metrics.dim()==1 and element_wise_metrics.numel()==batch_size