-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
featureIs an improvement or enhancementIs an improvement or enhancementhelp wantedOpen to be worked onOpen to be worked on
Description
🚀 Feature
The Callbacks has two functions on_batch_start and on_batch_end. The documentation and code execution shows that these are only called for training batches, not validaton (or test). I am building a Callback for my own logging/dashboarding via Streamlit and I have a requirement to track the progress of both the train batch steps and validation batch steps during training. I see that there is a validation progress bar in the console during training - how is this implemented (if not via a Callback)?
Current Code
class MyCallback(pl.Callback):
def on_train_start(self, trainer, pl_module):
self.train_batch_count = 0
self.train_batch_total = len(trainer.train_dataloader)
def on_batch_end(self, train, pl_module):
self.train_batch_count += 1
percent_complete = self.train_batch_count / self.train_batch_total
# display on screen
def on_epoch_end(self, train, pl_module):
self.train_batch_count = 0
kumuji
Metadata
Metadata
Assignees
Labels
featureIs an improvement or enhancementIs an improvement or enhancementhelp wantedOpen to be worked onOpen to be worked on