PyTorch CIFAR10


If Oríon not installed: pip install orion

If the database is not setup, you can follow the instructions here: Database Setup.

Alternatively, you can test the example without setting up a database by using the option –debug, but note that all data gathered during an execution will be lost at the end of it.

Set up

pip3 install torch torchvision

git clone
cd pytorch-cifar

Add to last line of test()

return 1 - (correct / len(test_loader.dataset))

Last line of the main() function

    test_error_rate = test(epoch)

report_objective(objective, name='test_error_rate')
orion -v hunt -n resnet18-cifar10 python --lr~'loguniform(1e-5, 1.0)'


If you are using python3, the script will fail with message

ImportError: No module named 'vgg'

You can fix this with the following command from the repository’s root.

sed -i 's/from /from ./g' models/