如何从模块外部禁用TQDM进度条。
我正在使用神经先知模块以预测时间表。在使用它时,由于某些原因,我得到了进度条的音调。其中一些我能够禁用,但是TQDM产生的进度栏仍在来。该TQDM用于神经prophet模块内部,因此无法更改。前任。 disable = true,离开= false将行不通。
I am working with neural prophet module for timeseries forecasting. While using it I got tones of progress bars which I don't want due to some reasons. Some of them I was able to disable but the progress bar generated from tqdm is still coming. This tqdm is used inside neuralprophet module so can't change it. Ex. disable=True, leave=False will not work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以用代码顶部的
tqdm
类覆盖tqdm
class,它没有做任何事情...然后作为示例(下一个代码可以在上述代码之后的任何位置),
输出不包含进度栏,而且,如果您想在代码中使用进度栏,则可以自己使用
tqdm_copy
对象。如果进度栏仍然存在,则还应该为TQDM内的其他迭代器做同样的操作。
请注意,如果您在导入使用它来保证它可以正常工作的任何模块之前,在将代码运行以禁用TQDM,最好是最好的。
you can overwrite the
tqdm
class in the top of your code with something that does nothing...then as an example (this next code can be anywhere after the above code)
the output contains no progress bar, and if you want to use a progress bar in your code then you can use the
tqdm_copy
object yourself.you should also do the same for other iterators inside tqdm if the progress bar is still there.
note that it is best if you run the code to disable tqdm before you import any of the modules that use it to guarantee this will work.