wukevin / tcr-bert

Large language modeling applied to T-cell receptor (TCR) sequences.
Apache License 2.0
47 stars 8 forks source link

Invalid version error using tcr-bert conda environment #8

Open alexcoulton opened 1 year ago

alexcoulton commented 1 year ago

I'm using commit 63aa483ec25a8f4727d1905267499ede75f524de

When I run the example command to train PCA-SVM:

python bin/embed_and_train_classifier.py example_files/glanville_np177_training_patient.tsv temp -t example_files/glanville_np177_testing_patients.tsv -c svm -g 0

I get the following:

Traceback (most recent call last):
  File "/mnt/c/Users/Alex/work/external.repos/tcr-bert/bin/embed_and_train_classifier.py", line 27, in <module>
    import featurization as ft
  File "/mnt/c/Users/Alex/work/external.repos/tcr-bert/tcr/featurization.py", line 18, in <module>
    from transformers import BertTokenizer
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/alex/anaconda3/envs/tcrbert/lib/python3.9/site-packages/transformers-4.4.2-py3.8.egg/transformers/__init__.py", line 43, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/alex/anaconda3/envs/tcrbert/lib/python3.9/site-packages/transformers-4.4.2-py3.8.egg/transformers/dependency_versions_check.py", line 41, in <module>
  File "/home/alex/anaconda3/envs/tcrbert/lib/python3.9/site-packages/transformers-4.4.2-py3.8.egg/transformers/utils/versions.py", line 94, in require_version_core
  File "/home/alex/anaconda3/envs/tcrbert/lib/python3.9/site-packages/transformers-4.4.2-py3.8.egg/transformers/utils/versions.py", line 85, in require_version
  File "/home/alex/anaconda3/envs/tcrbert/lib/python3.9/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/home/alex/anaconda3/envs/tcrbert/lib/python3.9/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '0.10.1,<0.11'
yanpinlu commented 1 year ago

I have also encountered this issue and then reinstalled transformers to fix it

cuber726579 commented 8 months ago

I have also encountered this issue and then reinstalled transformers to fix it

Hello! Which version of transformers do you install? Thanks!!!

cirdeCyL commented 5 months ago

I have version 4.4.2. THe same as the env.yaml file.

ctam8736 commented 3 weeks ago

I used transformers 4.11.1.