Skip to content

ValueError: Out of options! when passing surr_loss='hinge' to PairwiseAUCLoss #73

Closed

Description

@AmanKashyap0807

passing surr_loss="hinge" to PairwiseAUCLoss results in a ValueError: Out of options!.
Looking at libauc/losses/surrogate.py inside the get_surrogate_loss dispatcher, there is no elif statement for 'hinge', so it falls through to the else block and crashes.

Environment:
LibAUC Version: 2.0.0
PyTorch Version: 2.3.1

Activity

  1. PenGuln commented on Jun 24, 2026

    @PenGuln
    Collaborator

    Thanks for the report! hinge_loss was defined and listed in __all__ but accidentally omitted from the get_surrogate_loss dispatcher, so it passed the assert check but hit the ValueError. Fixed in surrogate.py#L85-L86

  2. AmanKashyap0807 commented on Jun 24, 2026

    @AmanKashyap0807
    Author

    @PenGuln Thank you so much for correcting f_ns and f_ps, you can also correct it from documentation on https://docs.libauc.org/_modules/libauc/losses/auc.html#PairwiseAUCLoss

  3. PenGuln commented on Jun 25, 2026

    @PenGuln
    Collaborator

    Thanks for the heads-up — the documentation has been updated as well. Please let us know if you run into any further issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions