dotnet / machinelearning

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

[release/3.0] Torch sharp version updates and test fixes #6958

Closed github-actions[bot] closed 5 months ago

github-actions[bot] commented 5 months ago

Backport of #6954 to release/3.0

/cc @michaelgsharp

Customer Impact

The older version of TorchSharp has a bug when a TorchSharp model is cleared with a finalizer. Updating to the latest version of TorchSharp resolves this issue.

Testing

All CI tests as well as full test passes of the large/full datatest were run to validate this.

Risk

Low-Mid. This is a dependency update and that always has a bit of risk.

codecov[bot] commented 5 months ago

Codecov Report

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

Comparison is base (ec498d8) 68.80% compared to head (bccebac) 68.80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/3.0 #6958 +/- ## ============================================ Coverage 68.80% 68.80% ============================================ Files 1240 1240 Lines 249652 249652 Branches 25511 25511 ============================================ + Hits 171769 171779 +10 + Misses 71281 71272 -9 + Partials 6602 6601 -1 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958/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/6958/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.80% <0.00%> (+<0.01%)` | :arrow_up: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.27% <0.00%> (+<0.01%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `88.41% <0.00%> (-0.01%)` | :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/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [...t/Microsoft.ML.TensorFlow.Tests/TensorflowTests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuVGVuc29yRmxvdy5UZXN0cy9UZW5zb3JmbG93VGVzdHMuY3M=) | `91.64% <ø> (-0.08%)` | :arrow_down: | | [test/Microsoft.ML.TorchSharp.Tests/NerTests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuVG9yY2hTaGFycC5UZXN0cy9OZXJUZXN0cy5jcw==) | `67.02% <ø> (ø)` | | | [...rosoft.ML.TorchSharp.Tests/ObjectDetectionTests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuVG9yY2hTaGFycC5UZXN0cy9PYmplY3REZXRlY3Rpb25UZXN0cy5jcw==) | `100.00% <ø> (ø)` | | | [test/Microsoft.ML.TorchSharp.Tests/QATests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuVG9yY2hTaGFycC5UZXN0cy9RQVRlc3RzLmNz) | `40.50% <ø> (ø)` | | | [...oft.ML.TorchSharp.Tests/TextClassificationTests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuVG9yY2hTaGFycC5UZXN0cy9UZXh0Q2xhc3NpZmljYXRpb25UZXN0cy5jcw==) | `85.17% <0.00%> (ø)` | | | [....TorchSharp/AutoFormerV2/ObjectDetectionTrainer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9PYmplY3REZXRlY3Rpb25UcmFpbmVyLmNz) | `85.90% <0.00%> (ø)` | | | [src/Microsoft.ML.TorchSharp/Roberta/QATrainer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL1JvYmVydGEvUUFUcmFpbmVyLmNz) | `77.96% <0.00%> (ø)` | | | [...c/Microsoft.ML.TorchSharp/TorchSharpBaseTrainer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL1RvcmNoU2hhcnBCYXNlVHJhaW5lci5jcw==) | `83.61% <0.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/6958/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet)