1

I am using google colab to execute the program. Pythoon veersion is 3.10.11 !pip install syft==0.8.0.post2 hook = sy.TorchHook(torch) but showing AttributeError: module 'syft' has no attribute 'TorchHook'

!pip install syft==0.8.0.post2 hook = sy.TorchHook(torch) but showing AttributeError: module 'syft' has no attribute 'TorchHook' Please fix the problem regarding syft==0.8.0.post2

Kamalika
  • 11
  • 1
  • [`TorchHook` does not appear in the documentation for PySyft](https://openmined.github.io/PySyft/search.html?q=TorchHook). Why do you think this should exist? – ChrisGPT was on strike Apr 30 '23 at 15:06

1 Answers1

1

sy.TorchHook() has been deprecated since the release of PySyft 0.3.0. It is not needed anymore to create VirtualWorkers or execute any other functions.

In general you can directly write :

import syft as sy
client = sy.virtualWorker(id="client")
Ilinii
  • 11
  • 3
  • I am using syft==0.3.0. But I am getting error: AttributeError: module 'syft' has no attribute 'VirtualMachine' – Christopher Marlowe Jun 22 '23 at 15:37
  • @ChristopherMarlowe Use `VirtualWorker` instead of `VirtualMachine`. Hope this helps ! – Ilinii Jun 24 '23 at 22:28
  • Traceback (most recent call last): File ".\syft.py", line 1, in import syft as sy File "E:\PhD\Summer 2023\udacity-FL\syft.py", line 2, in client = sy.virtualWorker(id="client") AttributeError: partially initialized module 'syft' has no attribute 'virtualWorker' (most likely due to a circular import) – Christopher Marlowe Jun 25 '23 at 17:21