microsoft / vert-papers

This repository contains code and datasets related to entity/knowledge papers from the VERT (Versatile Entity Recognition & disambiguation Toolkit) project, by the Knowledge Computing group at Microsoft Research Asia (MSRA).
MIT License
271 stars 92 forks source link

Error when running code of advpicker #48

Open LittleMouseInCoding opened 2 years ago

LittleMouseInCoding commented 2 years ago
image

As shown in the figure, I use the same environment as you suggest, still meet the bug, do you have any solution?

iofu728 commented 2 years ago

Hi @LittleMouseInCoding, it seems that the sp_data_ne is a empty list. You can replace the https://github.com/microsoft/vert-papers/blob/master/papers/AdvPicker/get_xl_data.py#L254 to

sp_data_ne = TensorDataset(*[torch.stack(ii) if ii else torch.tensor([])  for ii in sp_data_ne])

or increase the args.threshold.

LittleMouseInCoding commented 2 years ago

I changed the code as you suggested, and still can not reproduce the reported result.