-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQUEST] environmental variable to disable rich traceback #3640
Comments
Sorry if this is stating the obvious, but wouldn't it make sense if this was configurable in whatever dependency has installed Rich tracebacks? |
How can I reliably find that? |
This seems to be an issue that others have encountered and have proposed truncating locals for: #1810 Broadly I like rich and this is an edge case. The length of the output has made debugging an issue extremely difficult, which is the opposite of the intention of this package. This is my suggestion to fix that. |
But why should the onus be on Rich rather than whatever dependency has installed the traceback handler?
I have no idea what dependencies you have installed. I'm just suggesting that perhaps your first port of call should be whatever dependency that's using Rich, rather than going straight to Rich with the issue. |
Rich is the dependency that is producing the problematic output. |
I'm reluctant to impose non-standard environment variables on apps. It really isn't the place of a library to do that. I would petition the maintainer of the library that enabled the tracebacks to add that env var. Or, you could disable the exception hook. This will restore the Python default:
Alternatively, call |
How would you improve Rich?
I am using huggingface transformers to train a model in a project with a bunch of dependencies. One of those dependencies is installing the rich traceback.
When there is an error then over two thousand lines of output are printed because the model is serialized on almost every frame (>100 lines of output) along with large tensors, dataframes etc. This makes the stack trace unusable.
I cannot control the fact that
rich.traceback.install
has been called somewhere. It would be nice if I could set an environmental variable that would prevent the installation from taking effect.What problem does it solve for you?
I would be able to read and understand the stack trace that is produced.
The text was updated successfully, but these errors were encountered: