Skip to content

bugfix: HF Detector exceptions now handled gracefully by default#1170

Merged
leondz merged 1 commit intoNVIDIA:mainfrom
leondz:bug/hf_detector_explode_uncaught
Apr 19, 2025
Merged

bugfix: HF Detector exceptions now handled gracefully by default#1170
leondz merged 1 commit intoNVIDIA:mainfrom
leondz:bug/hf_detector_explode_uncaught

Conversation

@leondz
Copy link
Collaborator

@leondz leondz commented Apr 18, 2025

Resolves #482

HFDetector would raise exceptions from the underlying model by default. This was fine in the earliest days but stability is higher now.

Changes:

  • graceful_fail default is now True
  • graceful_fail exposed as configurable param
  • detector failures are logged
  • rm a print

Verification

  • run detectors tests
  • try and find a HFDetector that fails and put it the wrapped through its paces

@leondz leondz added bug Something isn't working detectors work on code that inherits from or manages Detector labels Apr 18, 2025
@leondz leondz marked this pull request as ready for review April 18, 2025 10:08
Copy link
Collaborator

@erickgalinkin erickgalinkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leondz leondz merged commit e79fe6a into NVIDIA:main Apr 19, 2025
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2025
@leondz leondz deleted the bug/hf_detector_explode_uncaught branch April 25, 2025 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working detectors work on code that inherits from or manages Detector

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: unhappy torch detectors should fail gracefully

2 participants