Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed `DDPHPCAccelerator` hangs in DDP construction by calling `init_device` ([#5157](https://github.com/PyTorchLightning/pytorch-lightning/pull/5157))


- Fixed `num_workers` for Windows example ([#5375](https://github.com/PyTorchLightning/pytorch-lightning/pull/5375))


## [1.1.3rc] - 2020-12-29

### Added
Expand Down
7 changes: 5 additions & 2 deletions pl_examples/basic_examples/mnist_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
import platform
from typing import Optional
from warnings import warn

from torch.utils.data import DataLoader, random_split

Expand Down Expand Up @@ -55,8 +56,10 @@ def __init__(
normalize: If true applies image normalize
"""
super().__init__(*args, **kwargs)
if platform.system() == "Windows":
# see: https://stackoverflow.com/a/59680818/4521646
if num_workers and platform.system() == "Windows":
# see: https://stackoverflow.com/a/59680818
warn(f"You have requested num_workers={num_workers} on Windows,"
" but currently recommended is 0, so we set it for you")
num_workers = 0

self.dims = (1, 28, 28)
Expand Down