Skip to content

Commit

Permalink
GAUC fix (pytorch#2619)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#2619

fix gauc multiple returns

Reviewed By: yunjiangster, arsatis

Differential Revision: D66853683

fbshipit-source-id: cf5f47a22086b2d225dc38b6dd3d90b25e53cc93
  • Loading branch information
Chenyu Zhao authored and facebook-github-bot committed Dec 6, 2024
1 parent 77640f8 commit f450c59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchrec/metrics/gauc.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ def _compute(self) -> List[MetricComputationReport]:
name=MetricName.GAUC_NUM_SAMPLES,
metric_prefix=MetricPrefix.LIFETIME,
value=compute_window_auc(
self.get_window_state("auc_sum"),
self.get_window_state("num_samples"),
cast(torch.Tensor, self.auc_sum),
cast(torch.Tensor, self.num_samples),
)["num_samples"],
),
MetricComputationReport(
Expand Down

0 comments on commit f450c59

Please sign in to comment.