-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
have tqdm call a callback when certain progress has been made #845
Comments
@ThyrixYang fine but probably won't be merged before #815 and/or it gets enough community support |
For future ref (manual from tqdm import tqdm as base_tqdm
# or: from tqdm.auto import tqdm as base_tqdm
class tqdm(base_tqdm):
def update(self, n=1):
super(tqdm, self).update(n)
some_callback(n) The |
Maybe this should change to a documentation change, rather than a feature request... that is pretty simple. Would this work with the 'auto' tqdm? |
yes. would work with |
Any updates on this? I'd love to do an integration with Notipy me that sends you an email every like, 12 hours of progress. |
duplicate of #518 - updated there... |
srry not a duplicate |
I think maybe if from tqdm.auto import tqdm as base_tqdm
class tqdm(base_tqdm):
def update(self, n=1, always_callback=False):
if super(tqdm, self).update(n) or always_callback:
some_callback(**self.format_dict) |
read the [known issues]
I would like to be able to have TQDM perform some callback at regular (or calculated) intervals.
For example, I would like tqdm to be able to send a message to slack when I'm 25% done. Or have tqdm send messages to a log file with much less frequency than when it sends to the console or notebook.
I am aware that this can be done by extending tqdm, but I thought it would be something that people might want built-in.
The text was updated successfully, but these errors were encountered: