-
Notifications
You must be signed in to change notification settings - Fork 3.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
Fixed val interval #405
Fixed val interval #405
Conversation
@@ -15,8 +18,11 @@ class TrainerDataLoadingMixin(object): | |||
def layout_bookeeping(self): | |||
|
|||
# determine number of training batches | |||
self.nb_training_batches = len(self.get_train_dataloader()) | |||
self.nb_training_batches = int(self.nb_training_batches * self.train_percent_check) | |||
if isinstance(self.get_train_dataloader(), IterableDataset): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this needs to be isinstance(self.get_train_dataloader().dataset, IterableDataset)
self.nb_training_batches = len(self.get_train_dataloader()) | ||
self.nb_training_batches = int(self.nb_training_batches * self.train_percent_check) | ||
if isinstance(self.get_train_dataloader(), IterableDataset): | ||
self.nb_training_batches = float('inf') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and tqdm
crashes because of the float('inf')
@ibeltagy to late, it is already merged... 8-/ |
Fixes #348
To use:
(checks val every 100 train batches interval)