Skip to content

a class-level tqdm.set_postfix_str() / status message #1794

Description

@dxqb

tqdm has tqdm.write(), for the purpose of printing without interfering with existing progress bars. It is class-level, so callers don't have to have the tqdm object.

However, this can get verbose when you want to print the current status ("Compiling x...").

I think tqdm should have a class-level function that transiently shows a text that is removed when the next status message is set, or when the progress bar starts progressing.

You can find a workaround implementation here:
https://github.com/dxqb/OneTrainer/blob/eb85620630a45b5616929ef913b028430bba2459/modules/util/tqdm_util.py

  • I have marked all applicable categories:
    • documentation request (i.e. "X is missing from the documentation." If instead I want to ask "how to use X?" I understand StackOverflow#tqdm is more appropriate)
    • new feature request
  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions