Skip to content

Conversation

ChristopherBrix
Copy link
Contributor

@ChristopherBrix ChristopherBrix commented Jan 25, 2021

Description

The test that verifies that all label ids are non-negative is not influenced by the loop, so it can be performed once at the beginning. This avoids a quadratic runtime, which has a high impact on execution time for very long sequences.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Tests

  • official/nlp/data/tagging_data_lib_test.py

Checklist

Code owners: @saberkun @chengithuber @lehougoogle @rachellj218 @jaeyounkim

CC: My intern host sundermeyer@google.com and co-host fhartmann@google.com

Copy link
Member

@saberkun saberkun left a comment

Choose a reason for hiding this comment

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

Thank you!

@saberkun saberkun added the ready to pull ready to pull (create internal pr review and merge automatically) label Mar 24, 2021
tf-models-copybara-bot pushed a commit that referenced this pull request Mar 24, 2021
@tf-models-copybara-bot tf-models-copybara-bot merged commit 5c3e08b into tensorflow:master Mar 24, 2021
@ChristopherBrix ChristopherBrix deleted the nlp_data_tagging_quadratic branch March 24, 2021 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes ready to pull ready to pull (create internal pr review and merge automatically)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants