Traceback (most recent call last):
File "/pycharmProjects/temp/temp.py", line 32, in <module>
template = Template()
File "/pycharmProjects/temp/temp.py", line 24, in __init__
loss, metric = Parser.load('crf2o-dep-en').evaluate('ptb/test.conllx', verbose=False)
File "/.miniconda3/envs/supar/lib/python3.7/site-packages/supar/parsers/dep.py", line 620, in evaluate
return super().evaluate(**Config().update(locals()))
File "/.miniconda3/envs/supar/lib/python3.7/site-packages/supar/parsers/dep.py", line 90, in evaluate
return super().evaluate(**Config().update(locals()))
File ".miniconda3/envs/supar/lib/python3.7/site-packages/supar/parsers/parser.py", line 109, in evaluate
dataset.build(batch_size, buckets)
File "/.miniconda3/envs/supar/lib/python3.7/site-packages/supar/utils/data.py", line 79, in build
fields = self.transform(self.sentences)
File "/.miniconda3/envs/supar/lib/python3.7/site-packages/supar/utils/transform.py", line 41, in __call__
sentence.transformed[f.name] = f.transform([getattr(sentence, f.name)])[0]
File "/.miniconda3/envs/supar/lib/python3.7/site-packages/supar/utils/field.py", line 372, in transform
charts = [torch.cat((torch.empty_like[:1].fill_(self.bos_index), chart), -1) for chart in charts]
File "/.miniconda3/envs/supar/lib/python3.7/site-packages/supar/utils/field.py", line 372, in <listcomp>
charts = [torch.cat((torch.empty_like[:1].fill_(self.bos_index), chart), -1) for chart in charts]
TypeError: 'builtin_function_or_method' object is not subscriptable
Dalao SOS, I just run
and it throws
My package version: