cog icon indicating copy to clipboard operation
cog copied to clipboard

Support simple TTY control characters to make progress bars work

Open bfirsh opened this issue 3 years ago • 3 comments
trafficstars

It'd be neat if progress bars didn't turn into a Christmas tree in the logs. If it returns to the start of the line, it should just overwrite the last log line.

Inspired by @zeke's comment about progress being shown on models.

bfirsh avatar May 13 '22 17:05 bfirsh

>
=>
==>
===>
====>
=====>

zeke avatar May 16 '22 19:05 zeke

Reminded of this by clipasso https://replicate.com/yael-vinker/clipasso

bfirsh avatar May 16 '22 19:05 bfirsh

I've written a failing test case for this, which will hopefully help guide development: https://github.com/replicate/cog/compare/614-progress-bars-in-logs

I fear the implementation might be tricky, as we're capturing the log output from stdout and stderr and I'm not sure we're actually getting those control characters through the way we're currently handling it.

evilstreak avatar May 25 '22 10:05 evilstreak