如何将Traceback恢复为正常?

huangapple go评论93阅读模式
英文:

How to change Traceback back to normal?

问题

我的最近环境打印的回溯信息如下:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮

这简直没有用。

我已经查看了这个链接:https://stackoverflow.com/questions/76375307/how-to-make-typer-traceback-look-normal 但没有帮助。

我猜可能与Huggingface有关,但也可能与datasetsevaluate等其他东西有关,但我迄今为止找不到任何有用的信息。

如何使堆栈跟踪打印出它需要的所有内容?

英文:

My most recent env prints traceback like this

╭───────────────────── Traceback (most recent call last) ──────────────────────╮

which is beyond useless.

I've already looked at this https://stackoverflow.com/questions/76375307/how-to-make-typer-traceback-look-normal but it doesn't help.

My hunch is it may be about Huggingface but maybe something else like datasets or evaluate but I can't find anything useful so far.

How to make stacktrace print everything it need to again?

答案1

得分: 2

这就是导致问题的这个东西。所以pip uninstall rich解决了一切。

2023年7月3日编辑

这似乎是与accelerate有关的问题,正如我最初预料的那样。在这种情况下,默认情况下会在可用时使用rich。所以,ACCELERATE_DISABLE_RICH=1应该可以解决问题,以防其他库需要rich进行其他操作。

英文:

It is this thing that causes the issue. So pip uninstall rich solved everything.

Edit July 3rd, 2023

This seems to be the issue with accelerate as I originally anticipated. In this case it default to use rich when available. So ACCELERATE_DISABLE_RICH=1 should fix the issue in case other libs require rich for something else.

huangapple
  • 本文由 发表于 2023年6月19日 12:40:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76503643.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定