Open ys7yoo opened 1 year ago
pip install transformers==4.5.1
Traceback (most recent call last):
File "example.py", line 7, in <module>
from model.net import KobertCRF
File "/home/yyoo/src/korner/model/net.py", line 5, in <module>
from kobert.pytorch_kobert import get_pytorch_kobert_model
File "/home/yyoo/src/korner/kobert/pytorch_kobert.py", line 23, in <module>
from transformers import BertModel, BertConfig
File "/home/yyoo/crf/lib/python3.8/site-packages/transformers/__init__.py", line 43, in <module>
from . import dependency_versions_check
File "/home/yyoo/crf/lib/python3.8/site-packages/transformers/dependency_versions_check.py", line 41, in <module>
require_version_core(deps[pkg])
File "/home/yyoo/crf/lib/python3.8/site-packages/transformers/utils/versions.py", line 101, in require_version_core
return require_version(requirement, hint)
File "/home/yyoo/crf/lib/python3.8/site-packages/transformers/utils/versions.py", line 92, in require_version
if want_ver is not None and not ops[op](version.parse(got_ver), version.parse(want_ver)):
File "/home/yyoo/crf/lib/python3.8/site-packages/packaging/version.py", line 52, in parse
return Version(version)
File "/home/yyoo/crf/lib/python3.8/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'
https://github.com/huggingface/transformers/issues/11799
pip install -U tokenizers