-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Attempt to retarget tests to .NET 6.0 #6367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I believe we're tripping up on the differences between CPUMath and Intrinsics. Either we're using the wrong data file, or we're loading the wrong CPUMath. Looking into it. |
Ideally we should just remove the knowledge of TargetFramework from the build, but that can happen in a follow up change.
I think I found and fixed the problems around test data. We weren't even using the .NETCore 3.1+ data since the way we were checking for .NETCore 3.1+ broke in 6.0. I fixed that. Also fixed a few other cases where we were conditioning our behavior based on .NETCore 3.1. I made all the chanages here "future proof" by avoiding hardcoding a version we'll have to change moving forward. |
This seems to have fixed the majority of the issues, here are the two remaining, across all platforms:
BinaryClassifierLogisticRegressionBinNormTest
These small changes seem like acceptable rounding error to me. I'm inclined to just update the .NET Core baseline files @michaelgsharp do you agree? |
Baseline data updated to account for those failures. We also have CPUMath failures on ARM64. Looks like those are trying to load |
It should only be included when TargetFramework is not compatible with netcoreapp3.1.
Ubuntu failure is well known system.drawing issue.
Rest of the legs are looking good 👍 Coverage is broken for some reason. I'll look into that next. |
I thought the bug here was that our PathResolver for loading from the nuget package cache was busted, but actually it's that the runtime.config.dev.json is no longer produced when targeting net6.0. This is the piece that tells the runtime how to locate the nuget package folder. https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/runtimeconfigdev-file We can fix this by setting |
We need this file to tell the runtime where the NuGet package cache is. It uses that location when we disable copying of NuGet dependencies.
ee1f674
to
ea44bda
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6367 +/- ##
==========================================
- Coverage 68.51% 68.49% -0.02%
==========================================
Files 1164 1165 +1
Lines 246113 246202 +89
Branches 25554 25744 +190
==========================================
+ Hits 168619 168646 +27
- Misses 70821 70870 +49
- Partials 6673 6686 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Looks very close. The one failure on ARM seems to be a transient test failure. I've opened #6377 to track it and reran that leg. |
...tput/Common/LogisticRegression/netcoreapp31/LogisticRegression-bin-norm-CV-breast-cancer.txt
Outdated
Show resolved
Hide resolved
test/Microsoft.ML.CpuMath.UnitTests/Microsoft.ML.CpuMath.UnitTests.csproj
Show resolved
Hide resolved
Also fix a couple places where ifdefs were hardcoded to the version of .NETCore.
* Attempt to retarget tests to .NET 6.0 * Fix places where tests had hardcoded framework versions * Update build naming Ideally we should just remove the knowledge of TargetFramework from the build, but that can happen in a follow up change. * Update test data for rounding differences on net6.0 * Fix condition on CPUMathNative reference in tests It should only be included when TargetFramework is not compatible with netcoreapp3.1. * Ensure we generate runtimeconfig.dev.json We need this file to tell the runtime where the NuGet package cache is. It uses that location when we disable copying of NuGet dependencies. * Rename test baseline output directory. Also fix a couple places where ifdefs were hardcoded to the version of .NETCore.
Trying out retargeting our tests to .NET 6.0.