(self)
| 372 | return self |
| 373 | |
| 374 | def __next__(self) -> List[Dict]: |
| 375 | if self.idx >= len(self.datas): |
| 376 | raise StopIteration |
| 377 | |
| 378 | if self.idx + self.real_batch_size > len(self.datas): |
| 379 | batch_data = self.datas[self.idx :] |
| 380 | self.idx = len(self.datas) |
| 381 | else: |
| 382 | batch_data = self.datas[self.idx : self.idx + self.real_batch_size] |
| 383 | self.idx += self.real_batch_size |
| 384 | |
| 385 | # Update absolute index for checkpoint |
| 386 | self.current_abs_idx = self.start_idx + self.idx |
| 387 | |
| 388 | # Load images for this batch on-demand |
| 389 | batch_data = self._load_images_for_batch(batch_data) |
| 390 | |
| 391 | return batch_data |
| 392 | |
| 393 | def update_checkpoint(self) -> None: |
| 394 | """Update checkpoint with current progress.""" |
nothing calls this directly
no test coverage detected