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

Ensure the loss value is cast as float #6928

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

svlandeg
Copy link
Member

@svlandeg svlandeg commented Feb 4, 2021

Fixes #6826

Description

Ensure that the loss value is cast as float. Otherwise on GPU, the cupy.core.core.ndarray object will create trouble during IO as it is not JSON serializable.

Types of change

bug fix

Checklist

  • I have submitted the spaCy Contributor Agreement.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@svlandeg svlandeg added bug Bugs and behaviour differing from documentation feat / nel Feature: Named Entity linking feat / serialize Feature: Serialization, saving and loading gpu Using spaCy on GPU labels Feb 4, 2021
@honnibal
Copy link
Member

honnibal commented Feb 4, 2021

I've had variations of this bug on so many components :(. It's such a pain that we can't easily test the cupy paths in the CI.

@honnibal honnibal merged commit a323ef9 into explosion:master Feb 6, 2021
@svlandeg svlandeg deleted the bugfix/float branch February 7, 2021 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and behaviour differing from documentation feat / nel Feature: Named Entity linking feat / serialize Feature: Serialization, saving and loading gpu Using spaCy on GPU
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Train EntityLinker on GPU
2 participants