open-mmlab / open-mmlab/mmengine

[Feature] Using `rich` to beautify the `ProgressBar` in `MMEngine`

Open
#989 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #998 by @Dominic23331 — closed without merging
community collaboration
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)

asciicast

rich version

asciicast

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.