Python TQDM软件包销售商不偶尔工作
由于我正在循环排列,因此我不想太频繁地更新进度栏,因此我将销售商设置为总长度的十分之一:
total_len = len(list(itertools.permutations(range(N), 2)))
for row_a, row_b in tqdm(itertools.permutations(range(N), 2), total=total_len , miniters=int(total_len/10), disable=disable):
矿物?
Since I'm looping over permutations I don't want too frequent updates of the progress bar, so I set miniters to be one-tenth of the total length:
total_len = len(list(itertools.permutations(range(N), 2)))
for row_a, row_b in tqdm(itertools.permutations(range(N), 2), total=total_len , miniters=int(total_len/10), disable=disable):
Any idea what's causing this unstable performance of miniters?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我找到了原因,另一个参数maxInterval控制最大更新间隔,该间隔设置为10(秒),因此,当进度条更新太慢时,它将自动修改迷你店参数。因此,我还需要指定更大的MaxInterval。
因此代码应该是
I think I found the reason, another argument maxinterval controls the maximum update interval which is set to 10 (seconds) by default, so when the progress bar updates too slowly it'll automatically modify the miniters parameter. Therefore I'll need to specify a larger maxinterval as well.
So the code should be