jozu-ai / kitops

Tools for easing the handoff between AI/ML and App/SRE teams.
https://KitOps.ml
Apache License 2.0
266 stars 26 forks source link

Add progress bar for kit pack #253

Closed amisevsk closed 1 month ago

amisevsk commented 2 months ago

Describe the problem you're trying to solve The kit push, kit pull, and kit unpack commands all show a progress bar while running, which is useful both for an ETA and to make it clear the command is still progressing in case of longer-running commands.

The pack command, however, does not have a progress bar.

Describe the solution you'd like Add progress bar for kit pack; this would require two passes through the to-be-packed data to get a total size for the bar

Describe alternatives you've considered Instead of a progress bar, we could do a spinner or a progress bar with a varying total size, avoiding the need to pre-process the data.

Additional context Original progress bars issue: https://github.com/jozu-ai/kitops/issues/80

bmicklea commented 2 months ago

Will it be possible for us to do the two passes in parallel? Like can we start packing and at the same time figure out total size and update with a progress bar after a little progress has already been made?

amisevsk commented 2 months ago

Compared to how long it takes to actually do the compression now, doing a quick pass first to get the total size won't have a huge impact on performance.

The other option is to try to update the progress bar live, e.g. adding 100MB if we hit a 100MB file during compression. I think our progress bar library supports this sort of thing.