dotnet / machinelearning

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

Adds in a way to add settings for the MLContext. #7273

Closed michaelgsharp closed 1 month ago

michaelgsharp commented 1 month ago

Adds in a way to add settings for the MLContext. This will allow us to add runtime options for things like OnnxRuntime and LightGBM, or additional advanced options we haven't exposed previously.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 70.43478% with 34 lines in your changes missing coverage. Please review.

Project coverage is 68.81%. Comparing base (f385b06) to head (c0f7906). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs 31.57% 23 Missing and 3 partials :warning:
...Microsoft.ML.OnnxTransformer/OnnxSessionOptions.cs 91.11% 2 Missing and 2 partials :warning:
src/Microsoft.ML.Data/MLContext.cs 40.00% 3 Missing :warning:
...osoft.ML.OnnxTransformerTest/OnnxTransformTests.cs 96.15% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7273 +/- ## ======================================= Coverage 68.80% 68.81% ======================================= Files 1461 1462 +1 Lines 272400 272497 +97 Branches 28176 28190 +14 ======================================= + Hits 187436 187508 +72 - Misses 77729 77749 +20 - Partials 7235 7240 +5 ``` | [Flag](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273/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/7273/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `68.81% <70.43%> (+<0.01%)` | :arrow_up: | | [production](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `63.30% <62.92%> (+<0.01%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `89.08% <96.15%> (+<0.01%)` | :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 with missing lines](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [src/Microsoft.ML.Core/Data/IHostEnvironment.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?src=pr&el=tree&filepath=src%2FMicrosoft.ML.Core%2FData%2FIHostEnvironment.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Db3JlL0RhdGEvSUhvc3RFbnZpcm9ubWVudC5jcw==) | `97.56% <ø> (ø)` | | | [src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?src=pr&el=tree&filepath=src%2FMicrosoft.ML.OnnxTransformer%2FOnnxTransform.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Pbm54VHJhbnNmb3JtZXIvT25ueFRyYW5zZm9ybS5jcw==) | `87.93% <100.00%> (+0.57%)` | :arrow_up: | | [...osoft.ML.OnnxTransformerTest/OnnxTransformTests.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?src=pr&el=tree&filepath=test%2FMicrosoft.ML.OnnxTransformerTest%2FOnnxTransformTests.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-dGVzdC9NaWNyb3NvZnQuTUwuT25ueFRyYW5zZm9ybWVyVGVzdC9Pbm54VHJhbnNmb3JtVGVzdHMuY3M=) | `95.56% <96.15%> (+0.01%)` | :arrow_up: | | [src/Microsoft.ML.Data/MLContext.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?src=pr&el=tree&filepath=src%2FMicrosoft.ML.Data%2FMLContext.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5EYXRhL01MQ29udGV4dC5jcw==) | `85.71% <40.00%> (-3.95%)` | :arrow_down: | | [...Microsoft.ML.OnnxTransformer/OnnxSessionOptions.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?src=pr&el=tree&filepath=src%2FMicrosoft.ML.OnnxTransformer%2FOnnxSessionOptions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Pbm54VHJhbnNmb3JtZXIvT25ueFNlc3Npb25PcHRpb25zLmNz) | `91.11% <91.11%> (ø)` | | | [src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273?src=pr&el=tree&filepath=src%2FMicrosoft.ML.OnnxTransformer%2FOnnxUtils.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#diff-c3JjL01pY3Jvc29mdC5NTC5Pbm54VHJhbnNmb3JtZXIvT25ueFV0aWxzLmNz) | `79.56% <31.57%> (-5.26%)` | :arrow_down: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/dotnet/machinelearning/pull/7273/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 1 month ago

merging on red as the failure is a known failure that has been fixed already.