Skip to content

Commit 66c5629

Browse files
EIFYNicolasHug
andauthored
Warning for dataset download & extract race condition (#8709)
Co-authored-by: Nicolas Hug <[email protected]>
1 parent 4249b61 commit 66c5629

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/source/datasets.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ All the datasets have almost similar API. They all have two common arguments:
2727
``transform`` and ``target_transform`` to transform the input and target respectively.
2828
You can also create your own datasets using the provided :ref:`base classes <base_classes_datasets>`.
2929

30+
.. warning::
31+
32+
When a dataset object is created with ``download=True``, the files are first
33+
downloaded and extracted in the root directory. This download logic is not
34+
multi-process safe, so it may lead to conflicts / race conditions if it is
35+
run within a distributed setting. In distributed mode, we recommend creating
36+
a dummy dataset object to trigger the download logic *before* setting up
37+
distributed mode.
38+
3039
Image classification
3140
~~~~~~~~~~~~~~~~~~~~
3241

0 commit comments

Comments
 (0)