Skip to content

Commit da3f89f

Browse files
YosuaMichaelfacebook-github-bot
authored andcommitted
[fbsync] fix missing torchdata error message (#5738)
Summary: (Note: this ignores all push blocking failures!) Reviewed By: jdsgomes, NicolasHug Differential Revision: D36095676 fbshipit-source-id: 2192ec444667dbf20e41ddd336d186f010e9bfbf
1 parent 7bf8748 commit da3f89f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

torchvision/prototype/datasets/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
try:
22
import torchdata
3-
except (ModuleNotFoundError, TypeError) as error:
3+
except ModuleNotFoundError:
44
raise ModuleNotFoundError(
55
"`torchvision.prototype.datasets` depends on PyTorch's `torchdata` (https://github.com/pytorch/data). "
6-
"You can install it with `pip install git+https://github.com/pytorch/data.git`. "
7-
"Note that you cannot install it with `pip install torchdata`, since this is another package."
8-
) from error
6+
"You can install it with `pip install --pre torchdata --extra-index-url https://download.pytorch.org/whl/nightly/cpu"
7+
) from None
98

109
from . import utils
1110
from ._home import home

0 commit comments

Comments
 (0)