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

Add spans in spacy benchmark #12575

Merged
merged 7 commits into from Apr 28, 2023

Conversation

ljvmiranda921
Copy link
Contributor

@ljvmiranda921 ljvmiranda921 commented Apr 26, 2023

This PR attempts to fix that by creating a new parameter for "spans" and calling the appropriate displaCy value.

Description

#12566

The current implementation of spaCy benchmark accuracy / spacy evaluate doesn't include the "spans" type, so calling the command doesn't render the HTML displaCy file needed. The reason why it wasn't included in the first place was probably because the "spans" feature in displaCy is relatively new.

Types of change

Bugfix

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • 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.

The current implementation of spaCy benchmark accuracy / spacy evaluate
doesn't include the "spans" type, so calling the command doesn't render
the HTML displaCy file needed.

This PR attempts to fix that by creating a new parameter for "spans"
and calling the appropriate displaCy value.
@ljvmiranda921 ljvmiranda921 added the bug Bugs and behaviour differing from documentation label Apr 26, 2023
@ljvmiranda921 ljvmiranda921 self-assigned this Apr 26, 2023
@svlandeg svlandeg linked an issue Apr 26, 2023 that may be closed by this pull request
@svlandeg svlandeg added the feat / cli Feature: Command-line interface label Apr 26, 2023
@ljvmiranda921 ljvmiranda921 marked this pull request as ready for review April 27, 2023 05:02
@ljvmiranda921
Copy link
Contributor Author

Should be ready for review!

Copy link
Contributor

@rmitsch rmitsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I could replicate #12566 with the current spaCy version, your branch seems to resolve the issue (spans.html is being generated).

@adrianeboyd
Copy link
Contributor

Looks good to me!

@adrianeboyd adrianeboyd merged commit 298e603 into explosion:master Apr 28, 2023
23 checks passed
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request May 12, 2023
* Add spans in spacy benchmark

The current implementation of spaCy benchmark accuracy / spacy evaluate
doesn't include the "spans" type, so calling the command doesn't render
the HTML displaCy file needed.

This PR attempts to fix that by creating a new parameter for "spans"
and calling the appropriate displaCy value.

* Reformat file with black

* Add tests for evaluate

* Fix spans -> span for displacy style

* Update test to check render instead

* Update source so mypy passes

* Add parser information to avoid warnings
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 / cli Feature: Command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI benchmark accuracy doesn't save rendered displacy htmls
4 participants