@@ -51,6 +51,10 @@ def __init__(
51
51
self .data : list [Any ] = []
52
52
53
53
if download :
54
+ raise ValueError (
55
+ "LFW dataset is no longer available for download."
56
+ "Please download the dataset manually and place it in the specified directory"
57
+ )
54
58
self .download ()
55
59
56
60
if not self ._check_integrity ():
@@ -90,6 +94,11 @@ def __len__(self) -> int:
90
94
class LFWPeople (_LFW ):
91
95
"""`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset.
92
96
97
+ .. warning:
98
+
99
+ The LFW dataset is no longer available for automatic download. Please
100
+ download it manually and place it in the specified directory.
101
+
93
102
Args:
94
103
root (str or ``pathlib.Path``): Root directory of dataset where directory
95
104
``lfw-py`` exists or will be saved to if download is set to True.
@@ -101,9 +110,7 @@ class LFWPeople(_LFW):
101
110
and returns a transformed version. E.g, ``transforms.RandomCrop``
102
111
target_transform (callable, optional): A function/transform that takes in the
103
112
target and transforms it.
104
- download (bool, optional): If true, downloads the dataset from the internet and
105
- puts it in root directory. If dataset is already downloaded, it is not
106
- downloaded again.
113
+ download (bool, optional): NOT SUPPORTED ANYMORE, leave to False.
107
114
loader (callable, optional): A function to load an image given its path.
108
115
By default, it uses PIL as its image loader, but users could also pass in
109
116
``torchvision.io.decode_image`` for decoding image data into tensors directly.
@@ -175,6 +182,11 @@ def extra_repr(self) -> str:
175
182
class LFWPairs (_LFW ):
176
183
"""`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset.
177
184
185
+ .. warning:
186
+
187
+ The LFW dataset is no longer available for automatic download. Please
188
+ download it manually and place it in the specified directory.
189
+
178
190
Args:
179
191
root (str or ``pathlib.Path``): Root directory of dataset where directory
180
192
``lfw-py`` exists or will be saved to if download is set to True.
@@ -186,9 +198,7 @@ class LFWPairs(_LFW):
186
198
and returns a transformed version. E.g, ``transforms.RandomRotation``
187
199
target_transform (callable, optional): A function/transform that takes in the
188
200
target and transforms it.
189
- download (bool, optional): If true, downloads the dataset from the internet and
190
- puts it in root directory. If dataset is already downloaded, it is not
191
- downloaded again.
201
+ download (bool, optional): NOT SUPPORTED ANYMORE, leave to False.
192
202
loader (callable, optional): A function to load an image given its path.
193
203
By default, it uses PIL as its image loader, but users could also pass in
194
204
``torchvision.io.decode_image`` for decoding image data into tensors directly.
0 commit comments