Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficient GPU support for Entity Linking pipe #4281

Open
svlandeg opened this issue Sep 12, 2019 · 2 comments
Open

Efficient GPU support for Entity Linking pipe #4281

svlandeg opened this issue Sep 12, 2019 · 2 comments
Labels
enhancement Feature requests and improvements feat / nel Feature: Named Entity linking gpu Using spaCy on GPU help wanted Contributions welcome!

Comments

@svlandeg
Copy link
Member

The new Entity Linking code has not been tested/adapted to GPU yet, cf Matt's comment here.

@svlandeg svlandeg added enhancement Feature requests and improvements feat / nel Feature: Named Entity linking gpu Using spaCy on GPU labels Sep 12, 2019
@zainbnv
Copy link

zainbnv commented Mar 5, 2020

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
plac.call(main)
File "/home/administrator/anaconda3/lib/python3.7/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/home/administrator/anaconda3/lib/python3.7/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "./all_wiki/wikidata_train_entity_linker.py", line 146, in main
logging.info("Epoch {}, train loss {}".format(itn, round(losses["entity_linker"] / batchnr, 2)))
TypeError: type cupy.core.core.ndarray doesn't define round method

@svlandeg svlandeg self-assigned this Mar 26, 2020
@svlandeg
Copy link
Member Author

svlandeg commented Apr 2, 2020

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 (#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.

@svlandeg svlandeg changed the title GPU support for Entity Linking pipe Efficient GPU support for Entity Linking pipe Apr 2, 2020
@svlandeg svlandeg added the help wanted Contributions welcome! label Apr 7, 2020
@svlandeg svlandeg removed their assignment Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and improvements feat / nel Feature: Named Entity linking gpu Using spaCy on GPU help wanted Contributions welcome!
Projects
None yet
Development

No branches or pull requests

2 participants