运行ner的few-shot的run.py时,ImportError: cannot import name 'AttentionUNet' from 'module'
Describe the question
A clear and concise description of what the question is.
您好,在运行example\new\few-shot时报错:
Traceback (most recent call last):
File "run.py", line 15, in
init.py)
Environment (please complete the following information):
- OS: window]
- Python Version [e.g. 3.8]
可以重新安装依赖包试试,建议使用python setup.py install的方式
您好,之前安装的时候就是使用python setup.py install的方式,安装依赖包后报错: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting transformers==3.4.0 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2c/4e/4f1ede0fd7a36278844a277f8d53c21f88f37f3754abf76a5d6224f76d4a/transformers-3.4.0-py3-none -any.whl (1.3 MB) ERROR: Could not find a version that satisfies the requirement pytorch==1.7.0 (from versions: 0.1.2, 1.0.2) ERROR: No matching distribution found for pytorch==1.7.0。
File "F:\Anaconda3\envs\deepke\lib\site-packages\deepke\relation_extraction\document\model.py", line 7, in from module import AttentionUNet, process_long_input 报错中这一行,对比src中https://github.com/zjunlp/DeepKE/blob/main/src/deepke/relation_extraction/document/model.py#L6 ,是不是修改过代码 找到F:\Anaconda3\envs\deepke\lib\site-packages\deepke\relation_extraction\document\model.py文件 module前加个点
您好,未修改过;之前已加点
File "F:\Anaconda3\envs\deepke\lib\site-packages\deepke\relation_extraction\document\model.py", line 7, in from module import AttentionUNet, process_long_input 报错中这一行,对比src中https://github.com/zjunlp/DeepKE/blob/main/src/deepke/relation_extraction/document/model.py#L6 ,是不是修改过代码 找到F:\Anaconda3\envs\deepke\lib\site-packages\deepke\relation_extraction\document\model.py文件 module前加个点
我重装一下试试