Skip to content

Commit

Permalink
Fix data fetcher selection (#11294)
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jan 5, 2022
1 parent f205172 commit 20fb7cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed an issue with the `TPUSpawnPlugin` handling the `XLA_USE_BF16` environment variable incorrectly ([#10990](https://github.com/PyTorchLightning/pytorch-lightning/pull/10990))


- Fixed data fetcher selection ([#11294](https://github.com/PyTorchLightning/pytorch-lightning/pull/11294))


## [1.5.7] - 2021-12-21

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/connectors/data_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _select_data_fetcher(self) -> AbstractDataFetcher:

def get_profiled_dataloader(self, dataloader: Iterable, dataloader_idx: int = 0) -> Iterable:
stage: str = self.trainer.state.stage.value
data_fetcher = setattr(self, f"{stage}_data_fetcher", None) or self._select_data_fetcher()
data_fetcher = getattr(self, f"{stage}_data_fetcher", None) or self._select_data_fetcher()
data_fetcher.setup(
dataloader,
stage=stage,
Expand Down

0 comments on commit 20fb7cf

Please sign in to comment.