cnr-ibf-pa / hbp-bsp-issues

Ticketing system for developers/testers and power users of the Brain Simulation Platform of the Human Brain Project
4 stars 0 forks source link

Validation Framework Demo - error #477

Closed clupascu closed 5 years ago

clupascu commented 5 years ago

Expected behavior

the use case runs without errors

Actual Behavior (please include screenshot if possible)

After the third cell I get

ImportErrorTraceback (most recent call last)

in () 39 install_req_packages() 40 ---> 41 import sciunit 42 from hbp_validation_framework import utils, TestLibrary, ModelCatalog /opt/conda/envs/python2/lib/python2.7/site-packages/sciunit/__init__.py in () 8 from __future__ import unicode_literals 9 ---> 10 from .utils import settings, log 11 from .models import Model 12 from .capabilities import Capability /opt/conda/envs/python2/lib/python2.7/site-packages/sciunit/utils.py in () 28 import sciunit 29 from sciunit.errors import Error ---> 30 from .base import SciUnit, FileNotFoundError, tkinter 31 from .base import PLATFORM, PYTHON_MAJOR_VERSION 32 try: /opt/conda/envs/python2/lib/python2.7/site-packages/sciunit/base.py in () 8 9 import numpy as np ---> 10 import pandas as pd 11 import git 12 from git.exc import GitCommandError, InvalidGitRepositoryError /opt/conda/envs/python2/lib/python2.7/site-packages/pandas/__init__.py in () 21 22 # numpy compat ---> 23 from pandas.compat.numpy import * 24 25 try: /opt/conda/envs/python2/lib/python2.7/site-packages/pandas/compat/numpy/__init__.py in () 22 'your numpy version is {0}.\n' 23 'Please upgrade numpy to >= 1.12.0 to use ' ---> 24 'this pandas version'.format(_np_version)) 25 26 ImportError: this version of pandas is incompatible with numpy < 1.12.0 your numpy version is 1.11.2. Please upgrade numpy to >= 1.12.0 to use this pandas version
appukuttan-shailesh commented 5 years ago

@clupascu : can you point me to the notebook that you are running (might need to give me access to Collab)? It would be useful to take a look at the version of the usecase that you are running, since the latest ones (on dev; still to be transferred to prod) explicitly install numpy = 1.16.2.

clupascu commented 5 years ago

@appukuttan-shailesh I gave you access to the Collab. I am using the latest version in prod. I cloned the notebook two days ago, when I opened this issue.

appukuttan-shailesh commented 5 years ago

Ah ok. All the UseCase notebooks had been updated on dev, and so it seems all the notebooks you cloned are the outdated versions.

@alex4200 had been testing the updated notebooks on dev and found some issues (#463, #464, #465). I just returned from holidays yesterday, and so shall be taking these issues up now. So I propose we close the recent issues (#477, #478, #479 - corresponding to outdated usecase versions) and that you test the latest ones on dev (in a day or two once I fix the issues). I shall let you know when they are ready.

clupascu commented 5 years ago

@appukuttan-shailesh I would prefer retesting the new usecase versions once they are in prod. I would let the issues opened until the new versions are in prod and working, in order to not forget about this issues.

clupascu commented 5 years ago

I retested this usecase and now, after I run cell number 8, I get this error

Traceback (most recent call last):

File "/opt/conda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in from models import cells

File "/home/jovyan/hbp-cerebellum-models/models/init.py", line 2, in from . import cells

File "/home/jovyan/hbp-cerebellum-models/models/cells/init.py", line 4, in from . import PC2015Masoli_model as PC2015Masoli

File "/home/jovyan/hbp-cerebellum-models/models/cells/PC2015Masoli_model.py", line 165 print " Done!" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(" Done!")?

alex4200 commented 5 years ago

@clupascu You have to switch the kernel to python2. Then it should work.

appukuttan-shailesh commented 5 years ago

I see that you seem to be using a Python 3 kernel. Many of us have found issues with Py3 kernel when running NEURON inside the collaboratory.

On Tue, 8 Oct 2019, 8:17 AM clupascu, notifications@github.com wrote:

I retested this usecase and now, after I run cell number 8, I get this error

Traceback (most recent call last):

File "/opt/conda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in from models import cells

File "/home/jovyan/hbp-cerebellum-models/models/init.py", line 2, in from . import cells

File "/home/jovyan/hbp-cerebellum-models/models/cells/init.py", line 4, in from . import PC2015Masoli_model as PC2015Masoli

File "/home/jovyan/hbp-cerebellum-models/models/cells/PC2015Masoli_model.py", line 165 print " Done!" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(" Done!")?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cnr-ibf-pa/hbp-bsp-issues/issues/477?email_source=notifications&email_token=AF5W5VNQMZ3OGCMRVKYHMGLQNQQWPA5CNFSM4I347IFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAS6W4Y#issuecomment-539356019, or mute the thread https://github.com/notifications/unsubscribe-auth/AF5W5VLC2ZBVXNDGVOOI3LLQNQQWPANCNFSM4I347IFA .

appukuttan-shailesh commented 5 years ago

In this particular case, the packages being used in the use case are not all Py3 compatible yet. I would suggest sticking with Py2 for the moment for all validation use cases. Alex also hasn't been able to test these for Py3 as of now.

On Tue, 8 Oct 2019, 8:17 AM clupascu, notifications@github.com wrote:

I retested this usecase and now, after I run cell number 8, I get this error

Traceback (most recent call last):

File "/opt/conda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in from models import cells

File "/home/jovyan/hbp-cerebellum-models/models/init.py", line 2, in from . import cells

File "/home/jovyan/hbp-cerebellum-models/models/cells/init.py", line 4, in from . import PC2015Masoli_model as PC2015Masoli

File "/home/jovyan/hbp-cerebellum-models/models/cells/PC2015Masoli_model.py", line 165 print " Done!" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(" Done!")?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cnr-ibf-pa/hbp-bsp-issues/issues/477?email_source=notifications&email_token=AF5W5VNQMZ3OGCMRVKYHMGLQNQQWPA5CNFSM4I347IFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAS6W4Y#issuecomment-539356019, or mute the thread https://github.com/notifications/unsubscribe-auth/AF5W5VLC2ZBVXNDGVOOI3LLQNQQWPANCNFSM4I347IFA .

alex4200 commented 5 years ago

@appukuttan-shailesh The problem here is that this notebook uses the python3 kernel by default. You have to change that on your side. I can see that when I go to https://collab.humanbrainproject.eu/#/collab/8123/nav/71948 and download the notebook. At the end of the file I see the following content:

"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"}

appukuttan-shailesh commented 5 years ago

Its changed now to Py2. Other notebooks don't have this problem as far as I can see.

On Tue, Oct 8, 2019 at 8:53 AM alex4200 notifications@github.com wrote:

@appukuttan-shailesh https://github.com/appukuttan-shailesh The problem here is that this notebook uses the python3 kernel by default. You have to change that on your side. I can see that when I go to https://collab.humanbrainproject.eu/#/collab/8123/nav/71948 and download the notebook. At the end of the file I see the following content:

"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"}

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cnr-ibf-pa/hbp-bsp-issues/issues/477?email_source=notifications&email_token=AF5W5VJVHU6XITOMN37Y2ATQNQU7FA5CNFSM4I347IFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEATBYIY#issuecomment-539368483, or mute the thread https://github.com/notifications/unsubscribe-auth/AF5W5VL7VF7DB6PZFFNER4DQNQU7FANCNFSM4I347IFA .

alex4200 commented 5 years ago

Yes, it was only the Demo notebook, the others are fine wrt. the kernel

clupascu commented 5 years ago

Now it seems to work, even if when I run some cells (for example cell number 9), the kernel is idle (I see the [*]), but the circle is white. Is a strange behaviour. @alex4200 do you experience the same? If not, we can close this issue.

alex4200 commented 5 years ago

@clupascu I am not sure I saw such a kind of behavior before. I will close the ticket for now