Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to import pysyft in lesson 1 Duet Basics (Foundations course) #438

Open
Merna-Atef opened this issue Dec 17, 2022 Discussed in #273 · 1 comment
Open

Comments

@Merna-Atef
Copy link

Merna-Atef commented Dec 17, 2022

I followed all the steps mentioned in the discussions and i still have this problem:

Discussed in #273

Originally posted by cbs-rschreijen March 17, 2021
Hi,

I setup a virtual environment (tried both conda and venv), activated it and installed pip requirements per course instruction. When running the notebooks for the Duet Basics demo I get an error at the first statement in both notebooks while loading the pysyft library (same error). I am running on macOS 11.1 Big Sur.


AttributeError Traceback (most recent call last)
in
----> 1 import syft as sy

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/init.py in
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

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/core/node/device/init.py in
1 # syft relative
----> 2 from .client import DeviceClient
3 from .device import Device
4
5 all = ["DeviceClient", "Device"]

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/core/node/device/client.py in
14 from ...io.location import SpecificLocation
15 from ...io.route import Route
---> 16 from ..common.client import Client
17
18

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/core/node/common/client.py in
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

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/lib/init.py in
24
25 # constructor: copyType = create_lib_ast
---> 26 lib_ast = create_lib_ast()
27 lib_ast._copy = create_lib_ast

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-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()

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/lib/torch/init.py in create_torch_ast()
51 # this allows us to import them for testing
52 continue
---> 53 ast.add_path(
54 path=method, framework_reference=torch, return_type_name=return_type
55 )

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/ast/globals.py in add_path(self, path, index, return_type_name, framework_reference)
63 attr = self.attrs[framework_name]
64 if hasattr(attr, "add_path"):
---> 65 attr.add_path( # type: ignore
66 path=path, index=1, return_type_name=return_type_name
67 )

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-packages/syft/ast/module.py in add_path(self, path, index, return_type_name, framework_reference)
118 self.lookup_cache[attr_ref] = path
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 )

~/opt/anaconda3/envs/conda-env/lib/python3.8/site-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'

@dbckz
Copy link

dbckz commented Dec 22, 2022

@Merna-Atef this answer might help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants