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

Invalid version error using tcr-bert conda environment #8

Open
alexcoulton opened this issue Jun 28, 2023 · 4 comments
Open

Invalid version error using tcr-bert conda environment #8

alexcoulton opened this issue Jun 28, 2023 · 4 comments

Comments

@alexcoulton
Copy link

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
Copy link

yanpinlu commented Sep 8, 2023

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

@cuber726579
Copy link

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

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

@cirdeCyL

This comment was marked as outdated.

@ctam8736
Copy link

I used transformers 4.11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants