Textualize / rich

Rich is a Python library for rich text and beautiful formatting in the terminal.
https://rich.readthedocs.io/en/latest/
MIT License
49.48k stars 1.72k forks source link

[REQUEST] Automatic Handling of Nested `track` calls #3543

Open Connor-Bernard opened 1 week ago

Connor-Bernard commented 1 week ago

Have you checked the issues for a similar suggestions?

How would you improve Rich?

I am really enjoying using rich and intend to continue using it whenever I am working with large datasets, but I think it would be extremely helpful to natively support the ability to have nested track statements. For example:

for i in track(range(10)):
    for j in track(range(10)):
        sleep(0.2)

The above example would render a live display with the overall progress like in the gif below but with only two progress bars and the second progress bar would reset to 0 with every iteration of i.

progress gif

What problem does it solve for you?

I am currently using this to track the training of LLMs which is awesome, but it means processing batches of entire datasets. Processing each batch takes a fair amount of time, so it would be really nice to see how quickly processing is occurring for each batch without having to configure detailed statistics or a more complex configuration with a Live Display.

Related Topics

github-actions[bot] commented 1 week ago

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory