Python progressbar adds its own dynamic information to the progressbar (prevent visuals)
import progressbar
import time
widgets = ['Progress:',
progressbar.Percentage(), ' ',
progressbar.Bar('='),' ',
progressbar.Timer(), ' ',
progressbar.DynamicMessage("training_batch_acc"),
]
bar=progressbar.ProgressBar(widgets=widgets, max_value=1000)
for i in range(1000):
time.sleep(1)
bar.dynamic_messages.training_batch_acc = 10
bar.update(i)
Dynamic information added by training_batch_ACC in the code, variable is set by Widgets, dynamic_messages.training_batch_ACC modify value, which can be displayed dynamically in real time, concise and clear
Read More:
- ModuleNotFoundError: No module named ‘tensorflow.python’ And the pits encountered after installation
- Python traverses all files under the specified path and retrieves them according to the time interval
- Python 3 uses the relative path import module
- Python raspberry pie starts sending IP address to mailbox
- Linux Fatal Python error: Py_Initialize Unable to get the locale encoding
- An introduction to sys modules in Python and how packages are imported and used
- pytorch: RuntimeError CUDA error device-side assert triggered
- Tips for Python 3 string.punctuation
- npm install Error: stack Error: Can’t find Python executable “python”
- Python: RNN principle realized by numpy
- Python error: ‘int’ object is not callable
- Python USES the PO design pattern for automated testing
- Full explanation of SYS module of Python
- How to Fix “HTTP error 403: forbidden” in Python 3. X
- Pychar can’t connect to Python console, but it can run. Py file, and Anaconda’s command line can run Python command
- Django WSGI protocol application, based on wsgiref module DIY a web framework
- How to Fix Errors encountered in executing Python scripts with command line parameters
- Python time tuples are converted to timestamps, strings
- Tesseract OCR text recognition using tess4j encapsulation
- You can run the Ansible Playbook in Python by hand