PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

Attribute error

Open AnchalAgarwal21 opened this issue 6 years ago • 8 comments

module 'syft' has no attribute 'ID_PROVIDER' tempsnip

AnchalAgarwal21 avatar Feb 21 '20 08:02 AnchalAgarwal21

@AnchalAgarwal21 What PySyft version are you using?

karlhigley avatar Feb 21 '20 16:02 karlhigley

@karlhigley 0.2.3a1

AnchalAgarwal21 avatar Feb 22 '20 18:02 AnchalAgarwal21

@AnchalAgarwal21 Huh, haven't seen that issue with that version. Could you share the output of pip list and the imports above in the notebook?

karlhigley avatar Feb 22 '20 18:02 karlhigley

I have a silly question but have done a full ‘import syft as sy’ before? I had a similar error when doing strange things during the syft import

What is the full sample of code you re trying to run?

LaRiffle avatar Feb 23 '20 11:02 LaRiffle

@karlhigley import torch as th from torch import nn,optim import syft as sy from syft.workers.virtual import VirtualWorker from syft.exceptions import WorkerNotFoundException

AnchalAgarwal21 avatar Feb 23 '20 14:02 AnchalAgarwal21

I copied the entire code on another notebook and to my surprise, it didn't give any error but now I have encountered another error. tempsnip1

AnchalAgarwal21 avatar Feb 23 '20 15:02 AnchalAgarwal21

You forgot to hook torch with hook = sy.TorchHook(torch) to extend torch tensors methods.

pierrepocreau avatar Feb 25 '20 10:02 pierrepocreau

Thank you @pierrepocreau ..I missed placing the hook torch.

AnchalAgarwal21 avatar Feb 25 '20 15:02 AnchalAgarwal21