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

Working on memory issue during tests for TorchSharp #7022

Closed michaelgsharp closed 3 months ago

michaelgsharp commented 4 months ago

We are excited to review your PR.

So we can do the best job, please check:

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 89.08795% with 67 lines in your changes are missing coverage. Please review.

Project coverage is 69.03%. Comparing base (902102e) to head (8b6fa30). Report is 22 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7022 +/- ## ========================================== + Coverage 68.80% 69.03% +0.22% ========================================== Files 1249 1261 +12 Lines 249686 252446 +2760 Branches 25485 25973 +488 ========================================== + Hits 171795 174272 +2477 - Misses 71294 71510 +216 - Partials 6597 6664 +67 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022/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/7022/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `69.03% <89.08%> (+0.22%)` | :arrow_up: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.52% <92.73%> (+0.25%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `88.61% <48.00%> (+0.20%)` | :arrow_up: | 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/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [.../Microsoft.ML.TorchSharp/AutoFormerV2/Attention.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9BdHRlbnRpb24uY3M=) | `98.87% <100.00%> (+0.22%)` | :arrow_up: | | [...ML.TorchSharp/AutoFormerV2/AutoFormerV2Backbone.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9BdXRvRm9ybWVyVjJCYWNrYm9uZS5jcw==) | `95.60% <100.00%> (+0.86%)` | :arrow_up: | | [...ft.ML.TorchSharp/AutoFormerV2/AutoFormerV2Block.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9BdXRvRm9ybWVyVjJCbG9jay5jcw==) | `90.17% <100.00%> (+1.28%)` | :arrow_up: | | [...crosoft.ML.TorchSharp/AutoFormerV2/AutoformerV2.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9BdXRvZm9ybWVyVjIuY3M=) | `100.00% <100.00%> (ø)` | | | [...Microsoft.ML.TorchSharp/AutoFormerV2/BasicLayer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9CYXNpY0xheWVyLmNz) | `95.12% <100.00%> (+0.83%)` | :arrow_up: | | [...c/Microsoft.ML.TorchSharp/AutoFormerV2/Conv2dBN.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9Db252MmRCTi5jcw==) | `100.00% <100.00%> (ø)` | | | [.../Microsoft.ML.TorchSharp/AutoFormerV2/ConvLayer.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9Db252TGF5ZXIuY3M=) | `100.00% <100.00%> (ø)` | | | [...Microsoft.ML.TorchSharp/AutoFormerV2/ConvModule.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9Db252TW9kdWxlLmNz) | `100.00% <100.00%> (ø)` | | | [src/Microsoft.ML.TorchSharp/AutoFormerV2/FPN.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9GUE4uY3M=) | `98.55% <100.00%> (+0.30%)` | :arrow_up: | | [src/Microsoft.ML.TorchSharp/AutoFormerV2/MBConv.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Ub3JjaFNoYXJwL0F1dG9Gb3JtZXJWMi9NQkNvbnYuY3M=) | `100.00% <100.00%> (ø)` | | | ... and [37 more](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | | ... and [37 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/7022/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 4 months ago

/azp run

azure-pipelines[bot] commented 4 months ago
Azure Pipelines successfully started running 2 pipeline(s).
michaelgsharp commented 4 months ago

/azp run

azure-pipelines[bot] commented 4 months ago
Azure Pipelines successfully started running 2 pipeline(s).
michaelgsharp commented 4 months ago

/azp run

azure-pipelines[bot] commented 4 months ago
Azure Pipelines successfully started running 2 pipeline(s).
ericstj commented 3 months ago

Seems like CA2213 should have caught these, but it's disabled. It would be good to re-enable it and ensure it catches these problems and ensure we got them all. Separately we might need to have an audit of all of our ruleset (compare with runtime) to see if we have others disabled.

michaelgsharp commented 3 months ago

So I just tried to enable CA2213 and we have a LOT of issues with it in our repo. I think it would be better to have a separate PR that does just that by itself, as it seems like it will be a decent amount of changes.

michaelgsharp commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 2 pipeline(s).