-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Disable download progress bars #755
Comments
Hi @austinmw , thanks for your feedback. The progress bar is caused by |
@austinmw Hi! it seems the dirty progress bar is caused by mmengine/mmengine/utils/dl_utils/hub.py Line 53 in d3d7528
load_url accepts the progress argument with the default value True , which causes the problem. Maybe we could set its default value according to whether it is in an interactive terminal or not?
|
Hi, thanks, that sounds like a great solution if possible. Not sure of the best way to do that, but this seems to correctly produce False in my environment: cmd = 'if [[ $- == *i* ]]; then echo "True"; else echo "False"; fi'
response = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
interactive = response.stdout.read().decode('utf-8').strip()
if interactive == 'True':
progress = True
else:
progress = False |
Will this solution https://stackoverflow.com/questions/6108330/checking-for-interactive-shell-in-a-python-script be more elegant? I'm not sure if it will work for your environment. |
Ah yes that solution works in my environment ( |
Great 😎😎 !, Would you mind proposing a PR to fix this this? |
@HAOCHENYE Hey, let me know how #770 looks. It works to remove the progress bars in my test environment. |
What is the feature?
Hi, when not using an interactive terminal (for example CloudWatch logs), each iteration of progress bars is printed to logs. So for example I typically have several hundred lines in my training logs that just print each iteration of progress bar for downloading checkpoint file(s).
Is there already any way to disable progress bars for file downloads? If not, I'd like propose a feature for disabling this through a config option.
Any other context?
For example (this goes on for several hundreds of lines):
The text was updated successfully, but these errors were encountered: