spaCy
spaCy copied to clipboard
Efficient GPU support for Entity Linking pipe
The new Entity Linking code has not been tested/adapted to GPU yet, cf Matt's comment here.
Yes I tried with GPU, but following error occurred:
020-03-05 03:50:46,682 - ERROR - main - Error updating batch:Unsupported type <class 'numpy.ndarray'>
2020-03-05 03:50:46,694 - ERROR - main - Error updating batch:Unsupported type <class 'numpy.ndarray'>
2020-03-05 03:50:46,696 - ERROR - main - Error updating batch:Unsupported type <class 'numpy.ndarray'>
2020-03-05 03:50:46,707 - ERROR - main - Error updating batch:Unsupported type <class 'numpy.ndarray'>
2020-03-05 03:50:46,714 - ERROR - main - Error updating batch:Unsupported type <class 'numpy.ndarray'>
2020-03-05 03:50:46,723 - ERROR - main - Error updating batch:Unsupported type <class 'numpy.ndarray'>
Traceback (most recent call last):
File "./all_wiki/wikidata_train_entity_linker.py", line 194, in
Update: the core EL code (i.e. not the wikipedia scripts which are outside the main library) has been tested and now runs on GPU (https://github.com/explosion/spaCy/pull/5236), but probably not very efficiently yet, so keeping this issue for now.
The wikipedia scripts is a separate issue - cf #5270. These scripts are not supported as part of the core library, as they really only showcase how the EL functionality can be used, but need adaptation to specific projects.