dotnet / machinelearning

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

Use new System.Numerics.Tensors library for DataFrame arithmetic operations (.net8) #7179

Open asmirnov82 opened 1 week ago

asmirnov82 commented 1 week ago

Use new System.Numerics.Tensors library for DataFrame arithmetic operations (.net8)

Fixes #7178

The aim of this PR to use new library for DataFrame arithmetic operations instead of custom implemtation. At the same time provide backward compatibility for pre-.Net8.0 versions of the package. To achive this, all .,net version specific code is localised in nested private classes of static class Arithmetic that implements IArithmetic<T> interface and are not used directly by any other DataFrame classes

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.67%. Comparing base (8e3f72d) to head (ee8bf16).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7179 +/- ## ========================================== - Coverage 68.67% 68.67% -0.01% ========================================== Files 1263 1263 Lines 257955 257955 Branches 26698 26698 ========================================== - Hits 177148 177142 -6 - Misses 73994 74000 +6 Partials 6813 6813 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179/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/7179/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.67% <0.00%> (-0.01%)` | :arrow_down: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `62.93% <0.00%> (-0.01%)` | :arrow_down: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `88.88% <ø> (ø)` | | 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/7179?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [...ta.Analysis/Computations/Arithmetic.netstandard.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179?src=pr&el=tree&filepath=src%2FMicrosoft.Data.Analysis%2FComputations%2FArithmetic.netstandard.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5EYXRhLkFuYWx5c2lzL0NvbXB1dGF0aW9ucy9Bcml0aG1ldGljLm5ldHN0YW5kYXJkLmNz) | `45.64% <ø> (ø)` | | | [....Analysis.Tests/DataFrameTests.BinaryOperations.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179?src=pr&el=tree&filepath=test%2FMicrosoft.Data.Analysis.Tests%2FDataFrameTests.BinaryOperations.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuRGF0YS5BbmFseXNpcy5UZXN0cy9EYXRhRnJhbWVUZXN0cy5CaW5hcnlPcGVyYXRpb25zLmNz) | `100.00% <ø> (ø)` | | | [...Microsoft.Data.Analysis/Computations/Arithmetic.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179?src=pr&el=tree&filepath=src%2FMicrosoft.Data.Analysis%2FComputations%2FArithmetic.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5EYXRhLkFuYWx5c2lzL0NvbXB1dGF0aW9ucy9Bcml0aG1ldGljLmNz) | `57.74% <0.00%> (-6.63%)` | :arrow_down: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/7179/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet)
ericstj commented 4 days ago

cc @michaelgsharp @tannergooding