(self)
| 224 | return math.ceil(total_samples / self.batch_size) # this is an estimation (due to max_combined_batch_size) |
| 225 | |
| 226 | def __str__(self): |
| 227 | return ( |
| 228 | f"Num datasets: {len(self.datasets)}\n" |
| 229 | f"Total samples (without ratio): {self.get_total_samples(multiplied_with_ratio=False)}\n" |
| 230 | f"Total samples (with ratio): {self.get_total_samples(multiplied_with_ratio=True)}\n" |
| 231 | f'Individual size: {" ".join([str(len(dset)) for dset in self.datasets])}\n' |
| 232 | f'Individual ratio: {" ".join([str(r) for r in self.dataset_ratios])}\n' |
| 233 | f"Max total samples per epoch: {self.max_total_samples_per_epoch}\n" |
| 234 | f"Batch size: {self.batch_size}\n" |
| 235 | f"Num batches: {len(self)}\n" |
| 236 | f"Shuffle: {self.shuffle}\n" |
| 237 | f"Drop last: {self.drop_last}\n" |
| 238 | f"Batch wrt length: {self.batch_wrt_length}" |
| 239 | ) |
| 240 | |
| 241 | def __iter__(self): |
| 242 | """ |
nothing calls this directly
no test coverage detected