dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
8.93k stars 1.86k forks source link

Fixes NER to correctly expand/shrink the labels #6928

Closed michaelgsharp closed 6 months ago

michaelgsharp commented 6 months ago

NER now will correctly expand/shrink the labels when a word is split into multiple tokens.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 65 lines in your changes are missing coverage. Please review.

Comparison is base (a60be5f) 68.80% compared to head (9a2da18) 68.80%. Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6928 +/- ## ======================================== Coverage 68.80% 68.80% ======================================== Files 1249 1249 Lines 249433 249638 +205 Branches 25510 25481 -29 ======================================== + Hits 171613 171774 +161 - Misses 71210 71271 +61 + Partials 6610 6593 -17 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [Debug](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.80% <70.45%> (+<0.01%)` | :arrow_up: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.27% <95.45%> (+0.01%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `88.41% <59.74%> (-0.09%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [.../Microsoft.ML.TorchSharp/NasBert/NasBertTrainer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL05hc0JlcnQvTmFzQmVydFRyYWluZXIuY3M=) | `80.36% <100.00%> (+0.24%)` | :arrow_up: | | [...c/Microsoft.ML.TorchSharp/TorchSharpBaseTrainer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL1RvcmNoU2hhcnBCYXNlVHJhaW5lci5jcw==) | `84.98% <100.00%> (+1.36%)` | :arrow_up: | | [src/Microsoft.ML.TorchSharp/NasBert/NerTrainer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL05hc0JlcnQvTmVyVHJhaW5lci5jcw==) | `91.10% <94.73%> (+2.86%)` | :arrow_up: | | [test/Microsoft.ML.Tests/NerTests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuVGVzdHMvTmVyVGVzdHMuY3M=) | `67.02% <59.74%> (-32.98%)` | :arrow_down: | ... and [17 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/6928/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet)
michaelgsharp commented 5 months ago

/backport to release/3.0

github-actions[bot] commented 5 months ago

Started backporting to release/3.0: https://github.com/dotnet/machinelearning/actions/runs/7453507161

github-actions[bot] commented 5 months ago

@michaelgsharp backporting to release/3.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: ner options fix
Applying: Ner fixed.
error: sha1 information is lacking or useless (src/Microsoft.ML.TorchSharp/NasBert/NerTrainer.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Ner fixed.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

github-actions[bot] commented 5 months ago

@michaelgsharp an error occurred while backporting to release/3.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

michaelgsharp commented 5 months ago

/backport to release/3.0

github-actions[bot] commented 5 months ago

Started backporting to release/3.0: https://github.com/dotnet/machinelearning/actions/runs/7454070942