Vision: Suppress output when loading cifar dataset

Created on 12 Nov 2017  路  3Comments  路  Source: pytorch/vision

Hi, could we suppress output("Files already downloaded and verified") because users often collect data from stdout and this message is a bit annoying when parsing log files.

Most helpful comment

Thanks @alykhantejani I know set download=False will work, just thinking about the verbose level as you explained.

All 3 comments

Hi @xuanqing94,

One way to avoid getting this message is to pass download=False to the constructor, then it won't even try to download (and subsequently tell you it already exists).

Ideally, we should move all of these messages into a logger at a verbose level (using pythons logging library). Then the user can decide what handlers they want to attach and what log level they care about.

Let me know if this solves your problem.

Thanks @alykhantejani I know set download=False will work, just thinking about the verbose level as you explained.

You can comment the line that prints the message in file "/miniconda3/envs/pytorch/lib/python3.7/site-packages/torchvision/datasets/cifar.py". To find the line you can search the string "Files already downloaded and verified" in the file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chinglamchoi picture chinglamchoi  路  3Comments

alpha-gradient picture alpha-gradient  路  3Comments

iacolippo picture iacolippo  路  4Comments

varagrawal picture varagrawal  路  3Comments

IssamLaradji picture IssamLaradji  路  3Comments