When attempting to use the barrier_hinge surrogate loss function inside PairwiseAUCLoss, the forward pass immediately crashes with a NameError because it attempts to reference an undefined variable rm.
Steps to reproduce:
import torch
from libauc.losses import PairwiseAUCLoss
loss_fn = PairwiseAUCLoss(surr_loss="barrier_hinge", hparam=(1.0, 1.0))
y_pred = torch.randn(10)
y_true = torch.tensor([1.0]*5 + [0.0]*5)
loss = loss_fn(y_pred, y_true)
Environment:
LibAUC Version: 2.0.0
PyTorch Version: 2.3.1
When attempting to use the
barrier_hingesurrogate loss function insidePairwiseAUCLoss, the forward pass immediately crashes with aNameErrorbecause it attempts to reference an undefined variablerm.Steps to reproduce:
Environment:
LibAUC Version: 2.0.0
PyTorch Version: 2.3.1