这是indexloc提供的服务,不要输入任何密码
Skip to content

Make defaults minimally invasive #61

@Erotemic

Description

@Erotemic

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions