Shortcuts

DataLoaderLoop

class pytorch_lightning.loops.dataloader.dataloader_loop.DataLoaderLoop[source]

Bases: pytorch_lightning.loops.loop.Loop

Base class to loop over all dataloaders.

on_advance_end()[source]

Hook to be called each time after advance is called.

Return type:

None

on_advance_start(*args, **kwargs)[source]

Hook to be called each time before advance is called.

Accepts all arguments passed to :attr`run`.

Return type:

None

reset()[source]

Resets the internal state.

Return type:

None

property current_dataloader: torch.utils.data.dataloader.DataLoader

Returns the current dataloader.

property current_dataloader_idx: int

Returns the index of the current dataloader.

abstract property dataloaders: Sequence[torch.utils.data.dataloader.DataLoader]

Returns the dataloaders to loop over.

property done: bool

Returns whether all dataloaders have been processed.

property num_dataloaders: int

Returns the number of dataloaders present.