Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AttributeError: module 'syft' has no attribute 'TorchHook'

Please seeking help from expert: When I am using pysyft library in python I am getting this error ( AttributeError: module 'syft' has no attribute 'TorchHook')

Here is my code screenshot [1]: https://i.sstatic.net/rPxWw.png

my environment : Spyder (Python IDE) Ubuntu 20.04 python3

like image 430
Shahedul Islam Avatar asked Jul 01 '26 17:07

Shahedul Islam


1 Answers

The version of syft you are using is v0.3.0+. It does not contain syft.TorchHook as I believe I read that it is not needed there. Use pip install syft==0.2.9 to use syft.TorchHook(). Especially if you are following that Secure and Private Course from Andrew Trask, Openmined.

Note that if you are indeed following that course, a new updated course has been introduced by the Openmined team. See https://courses.openmined.org/courses/foundations-of-private-computation for more details. It is based on an updated version of syft.

like image 193
Delton Myalil Avatar answered Jul 03 '26 09:07

Delton Myalil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!