Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kaivalyar
Copy link

@kaivalyar kaivalyar commented Apr 26, 2020

Allow setting the tqdm.disable option from the environment variables. The default value of False is unchanged, as is the expected behavior with None.

Resolves issues laid out it #619 #614 #612. Similar to the request in #370.

  • I have marked all applicable categories:
    • exception-raising fix
    • visual output fix
    • documentation modification
    • new feature
  • If applicable, I have mentioned the relevant/related issue(s)

Less important but also useful:

  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

Allow setting the tqdm.disable option from the environment variables. The default value of `False` is unchanged, as is the expected behavior with `None`.
@kaivalyar kaivalyar requested a review from casperdcl as a code owner April 26, 2020 23:45
@jarednielsen
Copy link

This would be helpful for my use case, where I'm using a third-party library which has a tqdm bar I'd like to disable but can't modify the library code itself easily.

@kaivalyar
Copy link
Author

Yes, this is exactly where I ran into this issue. I'm using pgmpy, which displays it's loops using the default tqdm behavior, which I would like to disable.

@jarednielsen
Copy link

Looks like this PR has been open for quite some time. @casperdcl Any thoughts on this change?

casperdcl added a commit that referenced this pull request Jun 25, 2020
All the bells & whistles!

- related #614
- realted #950
@Grokzen
Copy link

Grokzen commented Oct 26, 2020

A simple use-case for this option is that we are running a big set of code where we have both support to run the exact same code as a cli tool from a users computer and in a hosted environment inside celery. And when we run it in celery, we do not want our logs to be polluted with tdqm loggin output. This option would make it super easy to disable all tdqm logging as we have it in a lot of places in our code and we would just configure our production servers with this environment variable and we are all set.

@Mahdi-Hosseinali
Copy link

Any updates on this PR? This is very useful when running tests and in production.

casperdcl added a commit that referenced this pull request Aug 5, 2023
- fixes #370, fixes #612, fixes #619, fixes #1318
- closes #950, closes #1061
casperdcl added a commit that referenced this pull request Aug 8, 2023
- fixes #370, fixes #612, fixes #619, fixes #1318
- closes #950, closes #1061
casperdcl added a commit that referenced this pull request Aug 8, 2023
- fixes #370, fixes #612, fixes #619, fixes #1318
- closes #950, closes #1061
@casperdcl casperdcl self-assigned this Aug 9, 2023
@casperdcl casperdcl added duplicate πŸ— Seen it before p3-enhancement πŸ”₯ Much new such feature c3-small πŸ•’ Complexity medium labels Aug 9, 2023
@casperdcl
Copy link
Member

Thanks everyone for your patience! Just released tqdm==4.66.0 which includes support for env var overrides. I'm using TQDM_MININTERVAL=5 in most of my CI jobs now :)

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

Labels

c3-small πŸ•’ Complexity medium duplicate πŸ— Seen it before p3-enhancement πŸ”₯ Much new such feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants