-
-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Currently in addition to highlighting the error messages, pretty_errors will attempt to make them more concise by removing information in default traceback messages. This is a suggestion, and not necessarily a problem with the package, but it causes confusion when you don't expect this package to be imported.
The issue I had was torchmetrics imported this package, which patched the sys.execpthook, which left me very confused as to where the filepaths in my traceback went: Lightning-AI/torchmetrics#2544
If this package just highlighted the errors instead of removing the paths to the files they occurred in, then I would have loved the new unexpected behavior.
Because you need to already need have context in order to understand which files the filename-only method refers to perhaps getting that more concise set of errors should be an opt-in configuration? I.e. be minimally invasive by default and let the user choose if they want more complex behavior?