I am trying to run the 'flair/chunk-english-fast' module, it can not work.
- python 3.7
- transformers 4.25.1
- torch 1.7.1
- torchaudio 0.7.2
- torchvision 0.8.2
- flair 0.11.3
but if I change the another env ,it can be work.
- python 3.9
- transformers 4.38.2
- torch 2.2.1
- torchaudio 2.02
- torchvision 0.15.2
- flair 0.13
This is the erro:
Traceback (most recent call last):
File "E:\LFR-GAN_TOMM2023-master\LFR-GAN_TOMM2023-master\code\main.py", line 5, in <module>
from sentence_parser import parser
File "E:\LFR-GAN_TOMM2023-master\LFR-GAN_TOMM2023-master\code\sentence_parser.py", line 8, in <module>
from chunking import get_chunks
File "E:\LFR-GAN_TOMM2023-master\LFR-GAN_TOMM2023-master\code\chunking.py", line 8, in <module>
tagger = SequenceTagger.load("flair/chunk-english")
File "D:\Anaconda\envs\LFR\lib\site-packages\flair\nn\model.py", line 142, in load
state = torch.load(f, map_location="cpu")
File "D:\Anaconda\envs\LFR\lib\site-packages\torch\serialization.py", line 594, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "D:\Anaconda\envs\LFR\lib\site-packages\torch\serialization.py", line 853, in _load
result = unpickler.load()
ModuleNotFoundError: No module named 'torch.torch_version'
Because I'm running someone else's pre-trained model, I have high requirements for packages, and I want to ask how to run through the code in the existing environment,Tanks~