现在已经下载好了GLUE项目中的\glue_data里的所有原始数据文件,在其项目中提及,这些文件需要
After downloading GLUE, point in to the directory containing the data.PATH_PREFIXsrc/preprocess.py
但我在安装完所有需要的包之后,运行preprocess.py总是报错
Traceback (most recent call last):
File "preprocess.py", line 13, in
from allennlp_mods.numeric_field import NumericField
File "C:\Users\12408\Desktop\GLUE-baselines-master\GLUE-baselines-master\src\allennlp_mods\numeric_field.py", line 17, in
class NumericField(Field[numpy.ndarray]):
File "C:\Users\12408\Desktop\GLUE-baselines-master\GLUE-baselines-master\src\allennlp_mods\numeric_field.py", line 74, in NumericField
@OVERRIDES
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\overrides.py", line 83, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\overrides.py", line 172, in _overrides
_validate_method(method, super_class, check_signature)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\overrides.py", line 191, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\signature.py", line 103, in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\signature.py", line 304, in ensure_return_type_compatibility
f"{method_name}: return type {sub_return} is not a {super_return}."
TypeError: NumericField.empty_field: return type None is not a <class 'allennlp.data.fields.field.Field'>.
现在的问题是,本实验所需的GLUE数据集是直接拿下载好的\glue_data中的.tsv文件,就可以运行pmi_ngram.py,还是说必须要经过preprocess.py?如果需要,请问上述报错如何处理?
现在已经下载好了GLUE项目中的\glue_data里的所有原始数据文件,在其项目中提及,这些文件需要
After downloading GLUE, point in to the directory containing the data.PATH_PREFIXsrc/preprocess.py
但我在安装完所有需要的包之后,运行preprocess.py总是报错
Traceback (most recent call last):
File "preprocess.py", line 13, in
from allennlp_mods.numeric_field import NumericField
File "C:\Users\12408\Desktop\GLUE-baselines-master\GLUE-baselines-master\src\allennlp_mods\numeric_field.py", line 17, in
class NumericField(Field[numpy.ndarray]):
File "C:\Users\12408\Desktop\GLUE-baselines-master\GLUE-baselines-master\src\allennlp_mods\numeric_field.py", line 74, in NumericField
@OVERRIDES
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\overrides.py", line 83, in overrides
return _overrides(method, check_signature, check_at_runtime)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\overrides.py", line 172, in _overrides
_validate_method(method, super_class, check_signature)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\overrides.py", line 191, in _validate_method
ensure_signature_is_compatible(super_method, method, is_static)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\signature.py", line 103, in ensure_signature_is_compatible
ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
File "C:\Users\12408\anaconda3\envs\allennlp_env\lib\site-packages\overrides\signature.py", line 304, in ensure_return_type_compatibility
f"{method_name}: return type
{sub_return}is not a{super_return}."TypeError: NumericField.empty_field: return type
Noneis not a<class 'allennlp.data.fields.field.Field'>.现在的问题是,本实验所需的GLUE数据集是直接拿下载好的\glue_data中的.tsv文件,就可以运行pmi_ngram.py,还是说必须要经过preprocess.py?如果需要,请问上述报错如何处理?