I can not run the 'flair/chunk-english-fast' module .What is the 'torch.torch_version'?

21 Views Asked by At

I am trying to run the 'flair/chunk-english-fast' module, it can not work.

  1. python 3.7
  2. transformers 4.25.1
  3. torch 1.7.1
  4. torchaudio 0.7.2
  5. torchvision 0.8.2
  6. flair 0.11.3

but if I change the another env ,it can be work.

  1. python 3.9
  2. transformers 4.38.2
  3. torch 2.2.1
  4. torchaudio 2.02
  5. torchvision 0.15.2
  6. 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~

0

There are 0 best solutions below