PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

Part 6 and Part 11 Tutorial - List index out of range

Open DanyEle opened this issue 7 years ago • 9 comments

Describe the bug Part 11 Tutorial breaks when running cell n. 5 See also related issue #2243 Edit Error for torchvision >0.2.2

To Reproduce Steps to reproduce the behavior:

  1. Launch the Jupyter Notebook containing Part 11 - Secure Deep Learning tutorial
  2. Run all cells up to the following one:
test_loader = torch.utils.data.DataLoader(
    datasets.MNIST('../data', train=False,
                   transform=transforms.Compose([
                       transforms.ToTensor(),
                       transforms.Normalize((0.1307,), (0.3081,))
                   ])),
    batch_size=args.test_batch_size, shuffle=True)

private_test_loader = []
for data, target in test_loader:
    private_test_loader.append((
        data.fix_precision().share(alice, bob, crypto_provider=crypto_provider),
        target.fix_precision().share(alice, bob, crypto_provider=crypto_provider)
    ))
  1. Run that cell
  2. See the error generated:

https://pastebin.com/cYfEMJ2H

Expected behavior That the cell does indeed run Screenshots image image

Desktop (please complete the following information): Ubuntu 18.04 LTS PySyft 0.1.17

DanyEle avatar Jun 10 '19 07:06 DanyEle

Hello @DanyEle, you can see the discussion here: https://openmined.slack.com/archives/C6EEFN3A8/p1559737323042400?thread_ts=1559737323.042400 relate to issue 1893 here. I encounter the same problem as you do :).

polarbeargo avatar Jun 10 '19 08:06 polarbeargo

Hello @DanyEle, you can see the discussion here: https://openmined.slack.com/archives/C6EEFN3A8/p1559737323042400?thread_ts=1559737323.042400 relate to issue 1893 here. I encounter the same problem as you do :).

I confirm that issue also happens to me in Tutorial Part 6.

DanyEle avatar Jun 10 '19 09:06 DanyEle

And i was wondering if i am just to dump to get everything right... got the same Problem on any Tutorial which uses the MNIST Dataset.

jtagliaf avatar Jun 10 '19 10:06 jtagliaf

Hey, can you confirm you don't have a gpu or cuda?

LaRiffle avatar Jun 10 '19 10:06 LaRiffle

I use Google Colab.

polarbeargo avatar Jun 10 '19 10:06 polarbeargo

Indeed I experience the same on colab. I'm looking at it

LaRiffle avatar Jun 10 '19 10:06 LaRiffle

Hey, can you confirm you don't have a gpu or cuda?

I have a GPU and CUDA installed, but even when disabling CUDA, this still happens.

DanyEle avatar Jun 10 '19 11:06 DanyEle

Hey, can you confirm you don't have a gpu or cuda?

I do not have an external GPU.

Specs: Memory: 15,4 GiB Processor: Intel Core i7-7500U CPU @ 2.70GHz x 4 Graphics: Intel HD Graphics 620 (Kaby Lake GT2) OS: Ubuntu 18.10 64 Bit

Completly fresh installation with Anaconda and pip.

jtagliaf avatar Jun 10 '19 12:06 jtagliaf

The error is related to the torchvision 0.3.0 version. Will edit a fix for it

LaRiffle avatar Jun 10 '19 17:06 LaRiffle