Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lightning/pytorch/core/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ def log(
)

# make sure user doesn't introduce logic for multi-dataloaders
if "/dataloader_idx_" in name:
if add_dataloader_idx and "/dataloader_idx_" in name:
raise MisconfigurationException(
f"You called `self.log` with the key `{name}`"
" but it should not contain information about `dataloader_idx`"
" but it should not contain information about `dataloader_idx` when `add_dataloader_idx=True`"
)

value = apply_to_collection(value, (Tensor, numbers.Number), self.__to_tensor, name)
Expand Down
Loading