Closed 1treu1 closed 2 years ago
Hi @1treu1, looking at the script I believe that with the MODEL_NAME you set you do not need to pass MODEL_NAME/TASK_NAME to --model_name_or_path, but it's sufficient to pass MODEL_NAME.
I not understand
On the other hand I tried to import the dataset with language_modeling.py but I get the following error:
Searching a little I found that in these cases it is better to call the whole library, that is to say, change the from to import:
from ..processors.lm_utils import split_into_chunks It would be: import ..processors.lm_utils But it does not recognize the ..
I not understand
Simply remove /${TASK_NAME}
from the first argument you pass to the command. If you would use code snippets instead of screenshot it would be easier to help you ;)
On the other hand I tried to import the dataset with language_modeling.py but I get the following error:
Searching a little I found that in these cases it is better to call the whole library, that is to say, change the from to import:
from ..processors.lm_utils import split_into_chunks It would be: import ..processors.lm_utils But it does not recognize the ..
This makes me think you did not install the library properly, relative imports (with .
) work only inside modules i python.
Did you follow the setup from the README.md? It seems not given this error.
Please create the conda environment as described here: https://github.com/PaccMann/paccmann_proteomics#installation.
Verify the installation by runnig the python interpreter and trying the import:
import paccmann_proteomics
Yes, follow the README configuration. I create the environment as described here https://github.com/PaccMann/paccmann_proteomics#installation . Volvi a crear el environment otra vez pero sigue sin funcionar
The error is the next: ImportError: attempted relative import with no known parent package
ear el environment otra vez pero sigue sin funciona
can you share the output of the conda env creation? The error you shared clearly indicates that paccmann_proteomics
is not installed in the environment.
Yes, of course packages in environment at /home/ubuntu/anaconda3/envs/paccmann_proteomics: | Name | Version | Build | Channel |
---|---|---|---|---|
_libgcc_mutex | 0.1 | conda_forge | conda-forge | |
_openmp_mutex | 4.5 | 1_gnu | conda-forge | |
biopython | 1.79 | pypi_0 | pypi | |
boto3 | 1.20.44 | pypi_0 | pypi | |
botocore | 1.23.44 | pypi_0 | pypi | |
ca-certificates | 2021.10.8 | ha878542_0 | conda-forge | |
certifi | 2021.10.8 | pypi_0 | pypi | |
charset-normalizer | 2.0.10 | pypi_0 | pypi | |
click | 8.0.3 | pypi_0 | pypi | |
cycler | 0.11.0 | pypi_0 | pypi | |
filelock | 3.4.2 | pypi_0 | pypi | |
fonttools | 4.29.0 | pypi_0 | pypi | |
idna | 3.3 | pypi_0 | pypi | |
importlib-metadata | 4.10.1 | pypi_0 | pypi | |
jmespath | 0.10.0 | pypi_0 | pypi | |
joblib | 1.1.0 | pypi_0 | pypi | |
kiwisolver | 1.3.2 | pypi_0 | pypi | |
ld_impl_linux-64 | 2.36.1 | hea4e1c9_2 | conda-forge | |
libffi | 3.4.2 | h7f98852_5 | conda-forge | |
libgcc-ng | 11.2.0 | h1d223b6_12 | conda-forge | |
libgomp | 11.2.0 | h1d223b6_12 | conda-forge | |
libnsl | 2.0.0 | h7f98852_0 | conda-forge | |
libstdcxx-ng | 11.2.0 | he4da1e4_12 | conda-forge | |
libzlib | 1.2.11 | h36c2ea0_1013 | conda-forge | |
lmdb | 1.3.0 | pypi_0 | pypi | |
loguru | 0.5.3 | pypi_0 | pypi | |
matplotlib | 3.5.1 | pypi_0 | pypi | |
ncurses | 6.3 | h9c3ff4c_0 | conda-forge | |
numpy | 1.16.1 | pypi_0 | pypi | |
openssl | 3.0.0 | h7f98852_2 | conda-forge | |
paccmann-proteomics | 0.0.1 | dev_0 | ||
packaging | 21.3 | pypi_0 | pypi | |
pandas | 1.3.5 | pypi_0 | pypi | |
pillow | 9.0.0 | pypi_0 | pypi | |
pip | 20.2.4 | py_0 | conda-forge | |
protobuf | 3.19.3 | pypi_0 | pypi | |
pyparsing | 3.0.7 | pypi_0 | pypi | |
python | 3.7.12 | hf930737_100_cpython | conda-forge | |
python-dateutil | 2.8.2 | pypi_0 | pypi | |
python_abi | 3.7 | 2_cp37m | conda-forge | |
pytz | 2021.3 | pypi_0 | pypi | |
readline | 8.1 | h46c0cb4_0 | conda-forge | |
regex | 2022.1.18 | pypi_0 | pypi | |
requests | 2.27.1 | pypi_0 | pypi | |
s3transfer | 0.5.0 | pypi_0 | pypi | |
sacremoses | 0.0.47 | pypi_0 | pypi | |
scikit-learn | 0.23.2 | pypi_0 | pypi | |
scipy | 1.5.3 | pypi_0 | pypi | |
seaborn | 0.11.0 | pypi_0 | pypi | |
sentencepiece | 0.1.96 | pypi_0 | pypi | |
seqeval | 1.2.2 | pypi_0 | pypi | |
setuptools | 60.5.0 | py37h89c1867_0 | conda-forge | |
six | 1.16.0 | pypi_0 | pypi | |
sqlite | 3.37.0 | h9cd32fc_0 | conda-forge | |
tape-proteins | 0.4 | pypi_0 | pypi | |
tensorboardx | 2.0 | pypi_0 | pypi | |
threadpoolctl | 3.0.0 | pypi_0 | pypi | |
tk | 8.6.11 | h27826a3_1 | conda-forge | |
tokenizers | 0.8.0 | pypi_0 | pypi | |
torch | 1.10.1 | pypi_0 | pypi | |
torchvision | 0.5.0 | pypi_0 | pypi | |
tqdm | 4.62.3 | pypi_0 | pypi | |
transformers | 3.0.2 | pypi_0 | pypi | |
typing-extensions | 4.0.1 | pypi_0 | pypi | |
urllib3 | 1.26.8 | pypi_0 | pypi | |
wheel | 0.37.1 | pyhd8ed1ab_0 | conda-forge | |
xz | 5.2.5 | h516909a_1 | conda-forge | |
zipp | 3.7.0 | pypi_0 | pypi | |
zlib | 1.2.11 | h36c2ea0_1013 | conda-forge |
Thanks a lot, could you paste the output you get when doing the following:
which python
Open python
running:
python
Run the following in the python shell:
import paccmann_proteomics
Of course.
could you try to repeat the import starting the interpreter from another folder? I'm afraid you are currently importing the module from the path and not from the actual site-packages location
Done, I did it from desktop
ok then I really do not understand what is going wrong with the relative imports error you reported above. can you try to run from the repo root:
python paccmann_proteomics/run_language_modeling.py --help
Of course.
I solved the problem by changing "from ..processors.lm_utils import split_into_chunks" por "from paccmann_proteomics.data.processors.lm_utils import split_into_chunks" without quotation marks
I solved the problem by changing "from ..processors.lm_utils import split_into_chunks" por "from paccmann_proteomics.data.processors.lm_utils import split_into_chunks" without quotation marks
Hi @1treu1 I'm happy you solved it but the fact that you had to adapt the code means that the installation is somehow off. As we tested you should be able to run scripts leveraging the relative imports. Anyhow happy you can use our code in your research.
Good afternoon. I am trying to replicate the task run_seq_clf_script.sh but I get the following error:
The model and dataset paths are as follows:
Do you happen to know what might be wrong with my implementation?
numpy==1.16.1 torch>=1.3 transformers==3.0.2 tokenizers==0.8.0 torchvision==0.5 tensorboardX==2.0 pandas>1.0 loguru==0.5.3 tape_proteins==0.4 seaborn==0.11.0 scikit-learn==0.23.2 scipy==1.5.3 seqeval -e . CUDA 11.0