diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index f465d76f976..2127a1d22b7 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,4 +1,6 @@ -# Double quote -> single quote +# Prettier: double quote -> single quote +6a5aaf4b93507072d40dcd78114893362c4eaf6e +# Ruff: double quote -> single quote b09122f3e4a9cb422f6747bf33eca02993f67549 # Prettier bd9c75798eede1a4b7d7ecd6203179d3cb5e54dd diff --git a/.github/workflows/tutorials.yaml b/.github/workflows/tutorials.yaml index 67accad5e2c..f3e746499ee 100644 --- a/.github/workflows/tutorials.yaml +++ b/.github/workflows/tutorials.yaml @@ -33,7 +33,7 @@ jobs: - name: Install pip dependencies if: steps.cache.outputs.cache-hit != 'true' run: | - pip install -r requirements/required.txt -r requirements/docs.txt -r requirements/tests.txt planetary_computer pystac + pip install -r requirements/required.txt -r requirements/docs.txt -r requirements/tests.txt planetary_computer pystac . pip cache purge - name: List pip dependencies run: pip list diff --git a/torchgeo/datamodules/geo.py b/torchgeo/datamodules/geo.py index 5f5ae76b939..e8e3aedd194 100644 --- a/torchgeo/datamodules/geo.py +++ b/torchgeo/datamodules/geo.py @@ -286,6 +286,7 @@ def _dataloader_factory(self, split: str) -> DataLoader[dict[str, Tensor]]: batch_sampler=batch_sampler, num_workers=self.num_workers, collate_fn=self.collate_fn, + persistent_workers=self.num_workers > 0, ) def train_dataloader(self) -> DataLoader[dict[str, Tensor]]: @@ -429,6 +430,7 @@ def _dataloader_factory(self, split: str) -> DataLoader[dict[str, Tensor]]: shuffle=split == 'train', num_workers=self.num_workers, collate_fn=self.collate_fn, + persistent_workers=self.num_workers > 0, ) def train_dataloader(self) -> DataLoader[dict[str, Tensor]]: