open-mmlab / open-mmlab/mmengine
[Feature] Using `rich` to beautify the `ProgressBar` in `MMEngine`
Nobody has claimed this yet.
- #998 by @Dominic23331 — closed without merging
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 464
- PR merge metrics
- No merged PRs in 30d
Description
What is the feature?
The ProgressBar provided by MMEngine is not as visually appealing as third-party libraries such as rich. In order to maintain backward compatibility of MMEngine, we cannot simply delete the code related to ProgressBar. Therefore, we hope to refactor the implementation of ProgressBar based on rich.
Current effect:
import time
from mmengine.utils import track_progress
dummy = [0] * 10
func = lambda x: time.sleep(0.3)
track_progress(func, dummy)
rich version
Functions in this module need to be refactored
https://github.com/open-mmlab/mmengine/blob/main/mmengine/utils/progressbar.py
Any other context?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mmengine/utils/progressbar.py and review the linked pull request #998 for prior implementation context. Refactor the ProgressBar-related functions around rich while preserving the existing MMEngine ProgressBar behavior and backward compatibility; verify using the track_progress example from the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100