insilicomedicine / GENTRL

Generative Tensorial Reinforcement Learning (GENTRL) model
596 stars 215 forks source link

What numpy version? #35

Open masato-mouse opened 2 years ago

masato-mouse commented 2 years ago

I try Step4(run pretrain.ipynb) with numpy (version 1.15 / 1.16 / 1.17 /1.18) <ver 1.15> →AttributeError: module 'numpy.core.multiarray' has no attribute 'newbuffer' <ver 1.16 / 1.17 / 1.18> →NameError: name '_private' is not defined

Which version do I use? And please tell me solution.

●<envirments> env jupyter notebook python 3.5 scipy 1.4.1 pandas 0.23.4 torch 1.0.1

<error detail( ver 1.15)>

AttributeError Traceback (most recent call last) ~/GENTRL/examples/pretrain.ipynb in ----> 1 import gentrl 2 import torch 3 import pandas as pd 4 torch.cuda.set_device(0)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_andload(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_unlocked(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/gentrl-0.1-py3.5.egg/gentrl/init.py in ----> 1 from .encoder import RNNEncoder 2 from .decoder import DilConvDecoder 3 from .gentrl import GENTRL 4 from .dataloader import MolecularDataset 5

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_andload(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_unlocked(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/gentrl-0.1-py3.5.egg/gentrl/encoder.py in ----> 1 import torch 2 from torch import nn 3 from gentrl.tokenizer import encode, get_vocab_size 4 5

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/torch-1.0.1-py3.5-macosx-10.9-x86_64.egg/torch/init.py in 40 # or there is risk that later c modules will segfault when importing numpy 41 try: ---> 42 import numpy as _np 43 except ImportError: 44 pass

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/numpy/init.py in 140 return loader(*packages, **options) 141 --> 142 from . import add_newdocs 143 all = ['add_newdocs', 144 'ModuleDeprecationWarning',

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/numpy/add_newdocs.py in 2022 Returned, uninitialized buffer object of size bytes. 2023 -> 2024 """) 2025 2026 add_newdoc('numpy.core.multiarray', 'getbuffer',

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/numpy/core/function_base.py in add_newdoc(place, obj, doc, warn_on_python)

AttributeError: module 'numpy.core.multiarray' has no attribute 'newbuffer'

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

<error detail( ver 1.16 /1.17/ 1.18)>

NameError Traceback (most recent call last) ~/GENTRL/examples/pretrain.ipynb in ----> 1 import gentrl 2 import torch 3 import pandas as pd 4 torch.cuda.set_device(0)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_andload(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_unlocked(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/gentrl-0.1-py3.5.egg/gentrl/init.py in ----> 1 from .encoder import RNNEncoder 2 from .decoder import DilConvDecoder 3 from .gentrl import GENTRL 4 from .dataloader import MolecularDataset 5

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_andload(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_unlocked(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/importlib/_bootstrap.py in _load_backward_compatible(spec)

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/gentrl-0.1-py3.5.egg/gentrl/encoder.py in ----> 1 import torch 2 from torch import nn 3 from gentrl.tokenizer import encode, get_vocab_size 4 5

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/torch-1.0.1-py3.5-macosx-10.9-x86_64.egg/torch/init.py in 40 # or there is risk that later c modules will segfault when importing numpy 41 try: ---> 42 import numpy as _np 43 except ImportError: 44 pass

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/numpy/init.py in 185 # We don't actually use this ourselves anymore, but I'm not 100% sure that 186 # no-one else in the world is using it (though I hope not) --> 187 from .testing import Tester 188 189 # Pytest testing

~/opt/anaconda3/envs/xxxxx/lib/python3.5/site-packages/numpy/testing/init.py in 16 ) 17 ---> 18 all = _private.utils.all + ['TestCase', 'run_module_suite'] 19 20 from numpy._pytesttester import PytestTester

NameError: name '_private' is not defined