when I import syft
, the following error occured:
AttributeError: type object 'Tensor' has no attribute 'fft'
I followed the PySyft Doc installing syft.
I tried import syft
on both Ubuntu 18.04 and Google Colab environment. Both had the same errors.
The full error info on Google Colab is as follows,
import syft as sf
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-71fdfd268bf5> in <module>()
----> 1 import syft as sf
9 frames
/usr/local/lib/python3.7/dist-packages/syft/__init__.py in <module>()
59 from syft.core.common.serde.serialize import _serialize as serialize # noqa: F401
60 from syft.core.node.common.service.repr_service import ReprMessage # noqa: F401
---> 61 from syft.core.node.device.device import Device # noqa: F401
62 from syft.core.node.device.device import DeviceClient # noqa: F401
63 from syft.core.node.domain.domain import Domain # noqa: F401
/usr/local/lib/python3.7/dist-packages/syft/core/node/device/__init__.py in <module>()
1 # syft relative
----> 2 from .client import DeviceClient
3 from .device import Device
4
5 __all__ = ["DeviceClient", "Device"]
/usr/local/lib/python3.7/dist-packages/syft/core/node/device/client.py in <module>()
14 from ...io.location import SpecificLocation
15 from ...io.route import Route
---> 16 from ..common.client import Client
17
18
/usr/local/lib/python3.7/dist-packages/syft/core/node/common/client.py in <module>()
18 from ....core.pointer.pointer import Pointer
19 from ....decorators import syft_decorator
---> 20 from ....lib import lib_ast
21 from ....proto.core.node.common.client_pb2 import Client as Client_PB
22 from ....proto.core.node.common.metadata_pb2 import Metadata as Metadata_PB
/usr/local/lib/python3.7/dist-packages/syft/lib/__init__.py in <module>()
24
25 # constructor: copyType = create_lib_ast
---> 26 lib_ast = create_lib_ast()
27 lib_ast._copy = create_lib_ast
/usr/local/lib/python3.7/dist-packages/syft/lib/__init__.py in create_lib_ast()
10
11 python_ast = create_python_ast()
---> 12 torch_ast = create_torch_ast()
13 torchvision_ast = create_torchvision_ast()
14 # numpy_ast = create_numpy_ast()
/usr/local/lib/python3.7/dist-packages/syft/lib/torch/__init__.py in create_torch_ast()
52 continue
53 ast.add_path(
---> 54 path=method, framework_reference=torch, return_type_name=return_type
55 )
56 # add all the torch.nn.Parameter hooks
/usr/local/lib/python3.7/dist-packages/syft/ast/globals.py in add_path(self, path, index, return_type_name, framework_reference)
64 if hasattr(attr, "add_path"):
65 attr.add_path( # type: ignore
---> 66 path=path, index=1, return_type_name=return_type_name
67 )
68
/usr/local/lib/python3.7/dist-packages/syft/ast/module.py in add_path(self, path, index, return_type_name, framework_reference)
119 if hasattr(attr, "add_path"):
120 attr.add_path( # type: ignore
--> 121 path=path, index=index + 1, return_type_name=return_type_name
122 )
/usr/local/lib/python3.7/dist-packages/syft/ast/callable.py in add_path(self, path, index, return_type_name)
80 if path[index] not in self.attrs:
81
---> 82 attr_ref = getattr(self.ref, path[index])
83
84 if isinstance(attr_ref, module_type):
AttributeError: type object 'Tensor' has no attribute 'fft'
Does anyone know how to resolve this issue? Thanks.
PySyft currently does not support torch 1.8. See pysyft issue torch 1.8