@@ -50,23 +50,13 @@ def __init__(
5050 self .labels_file = f"{ self .view } { self .annot_file [self .split ]} .txt"
5151 self .data : list [Any ] = []
5252
53- """
54- Warning:
55-
56- The LFW dataset is no longer available for automatic download.
57- Please download it manually and place it in the specified directory.
58-
59- """
60-
6153 if download :
62- raise RuntimeError (
63-
54+ raise ValueError (
6455 "LFW dataset is no longer available for download."
6556 "Please download the dataset manually and place it in the specified directory"
6657 )
6758 self .download ()
6859
69-
7060 if not self ._check_integrity ():
7161 raise RuntimeError ("Dataset not found or corrupted. You can use download=True to download it" )
7262
@@ -104,6 +94,11 @@ def __len__(self) -> int:
10494class LFWPeople (_LFW ):
10595 """`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset.
10696
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+
107102 Args:
108103 root (str or ``pathlib.Path``): Root directory of dataset where directory
109104 ``lfw-py`` exists or will be saved to if download is set to True.
@@ -115,9 +110,7 @@ class LFWPeople(_LFW):
115110 and returns a transformed version. E.g, ``transforms.RandomCrop``
116111 target_transform (callable, optional): A function/transform that takes in the
117112 target and transforms it.
118- download (bool, optional): If true, downloads the dataset from the internet and
119- puts it in root directory. If dataset is already downloaded, it is not
120- downloaded again.
113+ download (bool, optional): NOT SUPPORTED ANYMORE, leave to False.
121114 loader (callable, optional): A function to load an image given its path.
122115 By default, it uses PIL as its image loader, but users could also pass in
123116 ``torchvision.io.decode_image`` for decoding image data into tensors directly.
@@ -189,6 +182,11 @@ def extra_repr(self) -> str:
189182class LFWPairs (_LFW ):
190183 """`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset.
191184
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+
192190 Args:
193191 root (str or ``pathlib.Path``): Root directory of dataset where directory
194192 ``lfw-py`` exists or will be saved to if download is set to True.
@@ -200,9 +198,7 @@ class LFWPairs(_LFW):
200198 and returns a transformed version. E.g, ``transforms.RandomRotation``
201199 target_transform (callable, optional): A function/transform that takes in the
202200 target and transforms it.
203- download (bool, optional): If true, downloads the dataset from the internet and
204- puts it in root directory. If dataset is already downloaded, it is not
205- downloaded again.
201+ download (bool, optional): NOT SUPPORTED ANYMORE, leave to False.
206202 loader (callable, optional): A function to load an image given its path.
207203 By default, it uses PIL as its image loader, but users could also pass in
208204 ``torchvision.io.decode_image`` for decoding image data into tensors directly.
0 commit comments