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

ModuleNotFoundError: No module named 'syft.core.adp.entity' #445

Open
AbdulMutakabbir opened this issue Feb 12, 2023 · 5 comments
Open

ModuleNotFoundError: No module named 'syft.core.adp.entity' #445

AbdulMutakabbir opened this issue Feb 12, 2023 · 5 comments
Labels
Type: Bug 🐛 Some functionality not working in the codebase as intended

Comments

@AbdulMutakabbir
Copy link

AbdulMutakabbir commented Feb 12, 2023

Description

ModuleNotFoundError: No module named 'syft.core.adp.entity'

How to Reproduce

  1. run
import syft as sy
from syft.core.adp.entity import Entity

dataset = {}

for person_index, test_result in enumerate(raw_data):
    data_owner = Entity(name=f'Patient #{person_index}')
    dataset[person_index] = sy.Tensor(np.ones(1, dtype=np.int32) * test_result).private(min_val=0, max_val=1, entities=data_owner)
  1. output
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/data/mutakabbir/Lightning/federated-learning/notebooks/pysyft_demo_1.ipynb Cell 2 in <cell line: 2>()
      [1](vscode-notebook-cell://ssh-remote%2B7b22686f73744e616d65223a224361726c65746f6e2d564d2d475055227d/data/mutakabbir/Lightning/federated-learning/notebooks/pysyft_demo_1.ipynb#W1sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) import syft as sy
----> [2](vscode-notebook-cell://ssh-remote%2B7b22686f73744e616d65223a224361726c65746f6e2d564d2d475055227d/data/mutakabbir/Lightning/federated-learning/notebooks/pysyft_demo_1.ipynb#W1sdnNjb2RlLXJlbW90ZQ%3D%3D?line=1) from syft.core.adp.entity import Entity
      [4](vscode-notebook-cell://ssh-remote%2B7b22686f73744e616d65223a224361726c65746f6e2d564d2d475055227d/data/mutakabbir/Lightning/federated-learning/notebooks/pysyft_demo_1.ipynb#W1sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3) dataset = {}
      [6](vscode-notebook-cell://ssh-remote%2B7b22686f73744e616d65223a224361726c65746f6e2d564d2d475055227d/data/mutakabbir/Lightning/federated-learning/notebooks/pysyft_demo_1.ipynb#W1sdnNjb2RlLXJlbW90ZQ%3D%3D?line=5) for person_index, test_result in enumerate(raw_data):

ModuleNotFoundError: No module named 'syft.core.adp.entity'

Expected Behavior

Entity should exist!!!

System Information

  • OS: Ubuntu
  • Language Version: Python 3.8
  • Package Manager Version: pip

Additional Context

packages

absl-py==1.4.0
alembic==1.8.1
ansible==6.7.0
ansible-core==2.13.7
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
ascii-magic==1.6
asttokens==2.0.5
async-timeout==4.0.2
attrs==22.1.0
backcall==0.2.0
bcrypt==4.0.1
beautifulsoup4==4.11.1
bleach==5.0.1
bokeh==2.4.3
boto3==1.26.51
botocore==1.29.69
branca==0.5.0
cachetools==5.3.0
certifi==2022.6.15
cffi==1.15.1
charset-normalizer==2.1.0
chex==0.1.6
click==8.1.3
click-plugins==1.1.1
cligj==0.7.2
cloudpickle==2.2.0
colorama==0.4.6
colorcet==3.0.1
contourpy==1.0.7
cryptography==39.0.1
cycler==0.11.0
dask==2022.10.0
dask-geopandas==0.2.0
databricks-cli==0.17.3
debugpy==1.6.2
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.6
distributed==2022.10.2
dm-tree==0.1.8
dnspython==2.3.0
docker==6.0.1
email-validator==1.3.1
entrypoints==0.4
et-xmlfile==1.1.0
etils==1.0.0
executing==0.9.1
fastjsonschema==2.16.1
filelock==3.9.0
Fiona==1.8.21
Flask==2.2.2
flatbuffers==2.0.7
flax==0.5.3
folium==0.12.1.post1
fonttools==4.34.4
forbiddenfruit==0.1.4
fsspec==2022.8.2
GeoAlchemy2==0.12.5
geopandas==0.11.1
gevent==22.10.2
gitdb==4.0.9
GitPython==3.1.29
graphviz==0.20.1
greenlet==2.0.2
gunicorn==20.1.0
hagrid==0.2.129
HeapDict==1.0.1
holoviews==1.15.1
hvplot==0.8.1
idna==3.3
importlib-metadata==5.0.0
importlib-resources==5.9.0
ipykernel==6.15.1
ipython==8.4.0
ipython-genutils==0.2.0
ipywidgets==7.7.1
itsdangerous==2.1.2
jax==0.3.14
jaxlib==0.3.14
jedi==0.18.1
Jinja2==3.1.2
jmespath==1.0.1
joblib==1.1.0
jsonschema==4.8.0
jupyter==1.0.0
jupyter-client==7.3.4
jupyter-console==6.4.4
jupyter-core==4.11.1
jupyterlab-pygments==0.2.2
jupyterlab-widgets==1.1.1
kiwisolver==1.4.4
locket==1.0.0
loguru==0.6.0
Mako==1.2.3
mapclassify==2.4.3
Markdown==3.4.1
markdown-it-py==2.1.0
MarkupSafe==2.1.1
matplotlib==3.6.3
matplotlib-inline==0.1.3
mdurl==0.1.2
mistune==0.8.4
mlflow==1.30.0
msgpack==1.0.4
munch==2.5.0
names==0.3.0
nbclient==0.6.6
nbconvert==6.5.0
nbformat==5.4.0
nest-asyncio==1.5.5
networkx==2.8.5
notebook==6.4.12
numpy==1.23.1
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
oauthlib==3.2.2
openpyxl==3.0.10
opt-einsum==3.3.0
optax==0.1.4
packaging==21.3
pandas==1.5.2
pandocfilters==1.5.0
panel==0.14.0
param==1.12.2
paramiko==3.0.0
parso==0.8.3
partd==1.3.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.2.0
platformdirs==3.0.0
plotly==5.9.0
prometheus-client==0.14.1
prometheus-flask-exporter==0.20.3
prompt-toolkit==3.0.30
protobuf==3.19.5
psutil==5.9.1
psycopg2-binary==2.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==10.0.1
pycapnp==1.2.2
pycparser==2.21
pyct==0.4.8
pydantic==1.10.4
pygeos==0.12.0
Pygments==2.14.0
PyJWT==2.6.0
Pympler==1.0.1
PyNaCl==1.5.0
pyOpenSSL==23.0.0
pyparsing==3.0.9
pyproj==3.3.1
pyrsistent==0.18.1
python-dateutil==2.8.2
pytz==2022.1
pyviz-comms==2.2.1
PyYAML==6.0
pyzmq==23.2.0
qtconsole==5.3.1
QtPy==2.1.0
querystring-parser==1.2.4
redis==4.4.2
requests==2.28.2
requests-toolbelt==0.10.1
resolvelib==0.8.1
rich==13.3.1
Rtree==1.0.0
s3transfer==0.6.0
scikit-learn==1.1.1
scipy==1.9.0
seaborn==0.12.1
Send2Trash==1.8.0
Shapely==1.8.2
six==1.16.0
smmap==5.0.0
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
SQLAlchemy==1.4.46
sqlparse==0.4.3
stack-data==0.3.0
syft==0.7.0
tabulate==0.9.0
tblib==1.7.0
tenacity==8.0.1
tensorstore==0.1.31
terminado==0.15.0
threadpoolctl==3.1.0
tinycss2==1.1.1
toolz==0.12.0
torch==1.13.0
torchvision==0.14.0
torchviz==0.0.2
tornado==6.1
tqdm==4.64.0
traitlets==5.3.0
typing-extensions==4.4.0
urllib3==1.26.11
virtualenv==20.19.0
virtualenv-api==2.1.18
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.4.2
Werkzeug==2.2.2
widgetsnbextension==3.6.1
zict==2.2.0
zipp==3.8.1
zope.event==4.6
zope.interface==5.5.2
@AbdulMutakabbir AbdulMutakabbir added the Type: Bug 🐛 Some functionality not working in the codebase as intended label Feb 12, 2023
@RickOwri
Copy link

RickOwri commented Apr 12, 2023

Error Description

ModuleNotFoundError: No module named 'syft.core.adp.entity'

Steps to Reproduce

  1. pip3 install syft
  2. run on jupyter lab

Input

import syft as sy
from syft.core.adp.entity import Entity

dataset = {}

for person_index, test_result in enumerate(raw_data):
    data_owner = Entity(name=f'Patient #{person_index}')
    dataset[person_index] = sy.Tensor(np.ones(1, dtype=np.int32) * test_result).private(min_val=0, max_val=1, entities=data_owner)

Ouput

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 2
      1 import syft as sy
----> 2 from syft.core.adp.entity import Entity
      4 dataset = {}
      6 for person_index, test_result in enumerate(raw_data):

ModuleNotFoundError: No module named 'syft.core.adp.entity'

Expected Behavior

Entity should exist

Actual Behavior

Entity do not exist

Error Message

Include any error messages or stack traces that were generated when the error occurred.

Troubleshooting Steps

  1. I have reinstalled the app
  2. I inspected the package : there is no reference to adp
  3. I tried this versions of the tutorial

Input

import numpy as np
import syft as sy
from syft.core.adp.data_subject import DataSubject

raw_data = np.random.choice([0, 1], size=(10)).astype(np.int32)
dataset = {}

for person_index, test_result in enumerate(raw_data):
    data_owner = DataSubject(name=f'Patient #{person_index}')
    dataset[person_index] = sy.Tensor(np.ones(1, dtype=np.int32) * test_result).annotate_with_dp_metadata(lower_bound=0, upper_bound=1, entities=data_owner)


domain_node = sy.login(email="[email protected]", password="changethis", port=8082)
# domain_node.load_dataset(assets=dataset, name="COVID19 Test Results", description="Positive/Negative COVID19 Test results", metadata="No metadata")

Output:

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[4], line 3
      1 import numpy as np
      2 import syft as sy
----> 3 from syft.core.adp.data_subject import DataSubject
      5 raw_data = np.random.choice([0, 1], size=(10)).astype(np.int32)
      6 dataset = {}

ModuleNotFoundError: No module named 'syft.core.adp'
  1. I looked in the slack community an tried :

Environment

Python 2.7.18
Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP  x86_64 x86_64 x86_64 GNU/Linux

Package                                  Version       
---------------------------------------- --------------
absl-py                                  1.4.0         
aiofiles                                 22.1.0        
aiosqlite                                0.18.0        
ansible                                  2.9.6         
ansible-core                             2.13.8        
anyio                                    3.6.2         
apache-libcloud                          2.8.0         
apturl                                   0.5.2         
argcomplete                              1.8.1         
argon2-cffi                              21.3.0        
argon2-cffi-bindings                     21.2.0        
ascii-magic                              1.6           
asttokens                                2.2.1         
astunparse                               1.6.3         
async-timeout                            4.0.2         
attrs                                    19.3.0        
Automat                                  0.8.0         
Babel                                    2.12.1        
backcall                                 0.2.0         
bcrypt                                   4.0.1         
beautifulsoup4                           4.12.1        
bleach                                   6.0.0         
blinker                                  1.4           
boto3                                    1.26.51       
botocore                                 1.29.111      
Brlapi                                   0.7.0         
cachetools                               5.3.0         
certifi                                  2022.12.7     
cffi                                     1.15.1        
chardet                                  3.0.4         
charset-normalizer                       3.1.0         
chex                                     0.1.7         
chrome-gnome-shell                       0.0.0         
click                                    8.1.3         
cloud-init                               22.4.2        
colorama                                 0.4.6         
comm                                     0.1.3         
command-not-found                        0.3           
commonmark                               0.9.1         
configobj                                5.0.6         
constantly                               15.1.0        
contourpy                                1.0.7         
cryptography                             40.0.1        
cupshelpers                              1.0           
cycler                                   0.11.0        
dbus-python                              1.2.16        
debugpy                                  1.6.7         
decorator                                5.1.1         
defer                                    1.0.6         
defusedxml                               0.7.1         
Deprecated                               1.2.13        
distlib                                  0.3.6         
distro                                   1.4.0         
distro-info                              0.23ubuntu1   
dm-tree                                  0.1.8         
dnspython                                2.3.0         
duplicity                                0.8.12.0      
email-validator                          1.3.1         
entrypoints                              0.3           
etils                                    1.2.0         
executing                                1.2.0         
fasteners                                0.14.1        
fastjsonschema                           2.16.3        
filelock                                 3.11.0        
flatbuffers                              2.0.7         
flax                                     0.5.3         
fonttools                                4.39.3        
forbiddenfruit                           0.1.4         
future                                   0.18.2        
gevent                                   22.10.2       
gipc                                     1.5.0         
gitdb                                    4.0.10        
GitPython                                3.1.31        
googleapis-common-protos                 1.56.2        
gpg                                      1.13.1-unknown
greenlet                                 2.0.2         
grpcio                                   1.54.0rc1     
hagrid                                   0.2.136       
httplib2                                 0.14.0        
hyperlink                                19.0.0        
idna                                     3.4           
importlib-metadata                       6.1.0         
importlib-resources                      5.12.0        
incremental                              16.10.1       
ipykernel                                6.22.0        
ipython                                  8.12.0        
ipython-genutils                         0.2.0         
ipywidgets                               8.0.6         
jax                                      0.3.14        
jaxlib                                   0.3.14        
jedi                                     0.18.2        
Jinja2                                   3.1.2         
jmespath                                 1.0.1         
json5                                    0.9.11        
jsonpatch                                1.22          
jsonpointer                              2.0           
jsonschema                               4.17.3        
jupyter-client                           8.1.0         
jupyter-core                             5.3.0         
jupyter-events                           0.6.3         
jupyter-server                           2.5.0         
jupyter-server-fileid                    0.8.0         
jupyter-server-terminals                 0.4.4         
jupyter-server-ydoc                      0.8.0         
jupyter-ydoc                             0.2.3         
jupyterlab                               3.6.3         
jupyterlab-pygments                      0.2.2         
jupyterlab-server                        2.22.0        
jupyterlab-widgets                       3.0.7         
keyring                                  18.0.1        
kiwisolver                               1.4.4         
language-selector                        0.1           
launchpadlib                             1.10.13       
lazr.restfulclient                       0.14.2        
lazr.uri                                 1.0.3         
lockfile                                 0.12.2        
loguru                                   0.6.0         
louis                                    3.12.0        
macaroonbakery                           1.3.1         
Mako                                     1.1.0         
markdown-it-py                           2.2.0         
MarkupSafe                               2.1.2         
matplotlib                               3.6.3         
matplotlib-inline                        0.1.6         
mdurl                                    0.1.2         
mistune                                  2.0.5         
monotonic                                1.5           
more-itertools                           4.2.0         
msgpack                                  1.0.5         
names                                    0.3.0         
nbclassic                                0.5.5         
nbclient                                 0.7.3         
nbconvert                                7.3.0         
nbformat                                 5.8.0         
nest-asyncio                             1.5.6         
netaddr                                  0.7.19        
netifaces                                0.10.4        
notebook                                 6.5.4         
notebook-shim                            0.2.2         
ntlm-auth                                1.1.0         
numpy                                    1.24.2        
nvidia-cublas-cu11                       11.10.3.66    
nvidia-cuda-nvrtc-cu11                   11.7.99       
nvidia-cuda-runtime-cu11                 11.7.99       
nvidia-cudnn-cu11                        8.5.0.96      
oauthlib                                 3.1.0         
olefile                                  0.46          
opendp                                   0.6.2         
opentelemetry-api                        1.14.0        
opentelemetry-exporter-jaeger            1.14.0        
opentelemetry-exporter-jaeger-proto-grpc 1.14.0        
opentelemetry-exporter-jaeger-thrift     1.14.0        
opentelemetry-instrumentation            0.35b0        
opentelemetry-instrumentation-requests   0.35b0        
opentelemetry-sdk                        1.14.0        
opentelemetry-semantic-conventions       0.35b0        
opentelemetry-util-http                  0.35b0        
opt-einsum                               3.3.0         
optax                                    0.1.4         
packaging                                23.0          
pandas                                   1.5.2         
pandocfilters                            1.5.0         
paramiko                                 2.6.0         
parso                                    0.8.3         
pexpect                                  4.6.0         
pickleshare                              0.7.5         
Pillow                                   9.5.0         
pip                                      20.0.2        
pkgutil-resolve-name                     1.3.10        
platformdirs                             3.2.0         
prometheus-client                        0.16.0        
prompt-toolkit                           3.0.38        
protobuf                                 3.19.5        
psutil                                   5.9.4         
ptyprocess                               0.7.0         
pure-eval                                0.2.2         
pyarrow                                  10.0.1        
pyasn1                                   0.4.2         
pyasn1-modules                           0.2.1         
pycairo                                  1.16.2        
pycapnp                                  1.2.2         
pycparser                                2.21          
pycrypto                                 2.6.1         
pycups                                   1.9.73        
pydantic                                 1.10.4        
Pygments                                 2.15.0        
PyGObject                                3.36.0        
PyHamcrest                               1.9.0         
PyJWT                                    2.6.0         
pykerberos                               1.1.14        
pymacaroons                              0.13.0        
pymongo                                  4.3.3         
Pympler                                  1.0.1         
PyNaCl                                   1.5.0         
pyOpenSSL                                23.1.1        
pyparsing                                3.0.9         
pyRFC3339                                1.1           
pyrsistent                               0.15.5        
pyserial                                 3.4           
python-apt                               2.0.1         
python-dateutil                          2.8.2         
python-debian                            0.1.36ubuntu1 
python-json-logger                       2.0.7         
pytz                                     2023.3        
pywinrm                                  0.3.0         
pyxdg                                    0.26          
PyYAML                                   6.0           
pyzmq                                    25.0.2        
redis                                    4.4.2         
reportlab                                3.5.34        
requests                                 2.28.2        
requests-kerberos                        0.12.0        
requests-ntlm                            1.1.0         
requests-toolbelt                        0.10.1        
requests-unixsocket                      0.2.0         
resolvelib                               0.8.1         
RestrictedPython                         6.0           
result                                   0.9.0         
rfc3339-validator                        0.1.4         
rfc3986-validator                        0.1.1         
rich                                     11.2.0        
s3transfer                               0.6.0         
scipy                                    1.10.1        
SecretStorage                            2.3.1         
selinux                                  3.0           
Send2Trash                               1.8.0         
service-identity                         18.1.0        
setuptools                               67.6.1        
sherlock                                 0.4.1         
simplejson                               3.16.0        
six                                      1.16.0        
smmap                                    5.0.0         
sniffio                                  1.3.0         
sos                                      4.4           
soupsieve                                2.4           
SQLAlchemy                               1.4.46        
ssh-import-id                            5.10          
stack-data                               0.6.2         
syft                                     0.7.0         
systemd-python                           234           
tensorstore                              0.1.35        
terminado                                0.17.1        
thrift                                   0.16.0        
tinycss2                                 1.2.1         
tomli                                    2.0.1         
toolz                                    0.12.0        
torch                                    1.13.1        
tornado                                  6.2           
tqdm                                     4.64.0        
traitlets                                5.9.0         
Twisted                                  18.9.0        
typeguard                                2.13.3        
typing-extensions                        4.4.0         
tzdata                                   2023.3        
ubuntu-advantage-tools                   27.12         
ubuntu-drivers-common                    0.0.0         
ufw                                      0.36          
unattended-upgrades                      0.1           
urllib3                                  1.26.15       
usb-creator                              0.3.7         
virtualenv                               20.21.0       
virtualenv-api                           2.1.18        
wadllib                                  1.3.3         
wcwidth                                  0.2.6         
webencodings                             0.5.1         
websocket-client                         1.5.1         
wheel                                    0.40.0        
widgetsnbextension                       4.0.7         
wrapt                                    1.15.0        
xkit                                     0.0.0         
xmltodict                                0.12.0        
y-py                                     0.5.9         
ypy-websocket                            0.8.4         
zipp                                     3.15.0        
zope.event                               4.6           
zope.interface                           6.0     

@Tahlil
Copy link

Tahlil commented Aug 13, 2023

I am having the same issue

@pelinkeskin
Copy link

I am having the same issue as well

@prakharrathi25
Copy link

I am having the same issue

@densalzmann
Copy link

densalzmann commented Apr 27, 2024

@AbdulMutakabbir @RickOwri
As I understood syft.core.adp.entity is deprecated after version 0.6.0. So, use another instructions for the Course 3 Updated in case you are using the 0.7.0 version or stick to syft==0.6.0

According to README:

Versions

0.9.0 - Coming soon...
0.8.7 (Beta) - dev branch 👈🏽 API - Coming soon...
0.8.6 (Stable) - API

Deprecated:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Some functionality not working in the codebase as intended
Projects
None yet
Development

No branches or pull requests

6 participants