Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Fix NER probabilities#700

Merged
brandenchan merged 4 commits intomasterfrom
ner_prob
Feb 2, 2021
Merged

Fix NER probabilities#700
brandenchan merged 4 commits intomasterfrom
ner_prob

Conversation

@brandenchan
Copy link
Copy Markdown
Contributor

Previously, the NER probabilities being returned were often probabilities for the wrong entities. This PR addresses this issue (#658 )

@brandenchan brandenchan self-assigned this Feb 1, 2021
@brandenchan
Copy link
Copy Markdown
Contributor Author

Prior to this PR, NER inferencing produced a single unnested list of Named Entities as predictions. After this PR, it is not a list of lists where each inner list corresponds to an input sample (i.e. if there are 3 input samples at inference time, the predictions will be a list populated by three lists).

It seems odd to me that this was the case. @Timoeller Do you think this change might break anything that is downstream of FARM?

@Timoeller
Copy link
Copy Markdown
Contributor

Mhh, I do not see where we use FARM NER in downstream applications and also "NER inferencing produced a single unnested list of Named Entities as predictions" seems not useful in the first place. So lets go with your newly implemented approach.

@Timoeller Timoeller self-requested a review February 1, 2021 17:58
Copy link
Copy Markdown
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

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

LGTM.

How about adding a test case that checks if labels and probs are in line now (I think it is good practice to always add test cases when we bugfix).

@brandenchan brandenchan merged commit fbeef7d into master Feb 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants