diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index fe00b1577a..8f9ab2dada 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -33,7 +33,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TestFramework" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Predictor.Tests", "test\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj", "{6B047E09-39C9-4583-96F3-685D84CA4117}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Functional.Tests", "test\Microsoft.ML.Functional.Tests\Microsoft.ML.Functional.Tests.csproj", "{CFED9F0C-FF81-4C96-8D5E-0436264CA7B5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.IntegrationTests", "test\Microsoft.ML.IntegrationTests\Microsoft.ML.IntegrationTests.csproj", "{CFED9F0C-FF81-4C96-8D5E-0436264CA7B5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.ResultProcessor", "src\Microsoft.ML.ResultProcessor\Microsoft.ML.ResultProcessor.csproj", "{3769FCC3-9AFF-4C37-97E9-6854324681DF}" EndProject diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index c467d8a2fb..5a0dd8a4ee 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -25,7 +25,8 @@ jobs: dotnetPath: $(Build.SourcesDirectory)/.dotnet/dotnet nugetFeed: https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json nightlyBuildProjPath: $(Build.SourcesDirectory)/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj - nightlyBuildRunPath: $(Build.SourcesDirectory)/bin/AnyCPU.$(_configuration)/Microsoft.ML.NightlyBuild.Tests/$(_targetFramework) + nightlyBuildRunPath: $(Build.SourcesDirectory)/artifacts/bin/Microsoft.ML.NightlyBuild.Tests/$(_configuration)/$(_targetFramework) + runNightlyBuildProj: $(Build.SourcesDirectory)/test/run-night-build-tests.proj packageUpdaterProjPath: $(Build.SourcesDirectory)/test/Microsoft.ML.NugetPackageVersionUpdater/Microsoft.ML.NugetPackageVersionUpdater.csproj versionFilePath: $(Build.SourcesDirectory)/test/Microsoft.ML.NugetPackageVersionUpdater/latest_versions.txt PROCDUMP_PATH: '$(Build.SourcesDirectory)/Tools/ProcDump/' @@ -100,25 +101,25 @@ jobs: displayName: Update package versions for nightly build - ${{ if eq(parameters.buildScript, 'build.cmd') }}: - powershell: | - Get-ChildItem -Path '.\bin\AnyCPU.*' -Recurse | + Get-ChildItem -Path '.\artifacts\bin\*' -Recurse | Select -ExpandProperty FullName | - Where {$_ -notlike '*\Microsoft.ML.NightlyBuild.Tests*'} | + Where {$_ -NotMatch '.*\\Microsoft\.ML\.NightlyBuild\.Tests.*|.*\\Native.*'} | sort length -Descending | Remove-Item -force Write-Output "Done cleaning up usless project..." displayName: Clean up useless project - - script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} + - script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} displayName: Build Nightly-Build Project with latest package versions - - script: ${{ parameters.buildScript }} /p:Build=false -$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -runnightlybuildtests /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + - script: $(dotnetPath) msbuild $(runNightlyBuildProj) /t:RunNightlyBuildTests /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} displayName: Run Nightly Build Tests - ${{ if eq(parameters.nightlyBuild, 'false') }}: - ${{ if eq(parameters.innerLoop, 'false') }}: - ${{ if and(eq(parameters.runSpecific, 'false'), eq(parameters.useVSTestTask, 'false')) }}: # TODO: Code coverage needs to be fixed. - - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -ci #-coverage=${{ parameters.codeCoverage }} + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci #-coverage=${{ parameters.codeCoverage }} displayName: Run All Tests. - ${{ if and(eq(parameters.runSpecific, 'true'), eq(parameters.useVSTestTask, 'false')) }}: - - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -ci /p:TestRunnerAdditionalArguments='-trait$(spaceValue)Category=RunSpecificTest' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages #-coverage=${{ parameters.codeCoverage }} + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-trait$(spaceValue)Category=RunSpecificTest' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages #-coverage=${{ parameters.codeCoverage }} displayName: Run Specific Tests. - ${{ if and(eq(parameters.buildScript, 'build.cmd'), eq(parameters.useVSTestTask, 'true')) }}: - task: VSTest@2 @@ -142,7 +143,7 @@ jobs: collectDumpOn: onAbortOnly publishRunAttachments: true - ${{ if eq(parameters.innerLoop, 'true') }}: - - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages #-coverage=${{ parameters.codeCoverage }} + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages #-coverage=${{ parameters.codeCoverage }} displayName: Run CI Tests. - script: $(dotnetPath) msbuild -restore build/Codecoverage.proj displayName: Upload coverage to codecov.io diff --git a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj index 89d6108ac5..c6360b16e5 100644 --- a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj +++ b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj @@ -116,6 +116,8 @@ UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" --> + + @@ -125,4 +127,6 @@ + + \ No newline at end of file diff --git a/test/Microsoft.ML.Functional.Tests/Common.cs b/test/Microsoft.ML.IntegrationTests/Common.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/Common.cs rename to test/Microsoft.ML.IntegrationTests/Common.cs index b8f943e094..be60b71c3e 100644 --- a/test/Microsoft.ML.Functional.Tests/Common.cs +++ b/test/Microsoft.ML.IntegrationTests/Common.cs @@ -6,11 +6,11 @@ using System.Collections.Generic; using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Xunit; using Xunit.Sdk; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { internal static class Common { diff --git a/test/Microsoft.ML.Functional.Tests/DataIO.cs b/test/Microsoft.ML.IntegrationTests/DataIO.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/DataIO.cs rename to test/Microsoft.ML.IntegrationTests/DataIO.cs index 2cff7132c8..431b1ff2f7 100644 --- a/test/Microsoft.ML.Functional.Tests/DataIO.cs +++ b/test/Microsoft.ML.IntegrationTests/DataIO.cs @@ -3,17 +3,17 @@ // See the LICENSE file in the project root for more information. using System.IO; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { /// /// Test data input and output formats. /// - public class DataIO : FunctionalTestBaseClass + public class DataIO : IntegrationTestBaseClass { // Separators to test private readonly char[] _separators; diff --git a/test/Microsoft.ML.Functional.Tests/DataTransformation.cs b/test/Microsoft.ML.IntegrationTests/DataTransformation.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/DataTransformation.cs rename to test/Microsoft.ML.IntegrationTests/DataTransformation.cs index 8ce91e83dc..445680f7d5 100644 --- a/test/Microsoft.ML.Functional.Tests/DataTransformation.cs +++ b/test/Microsoft.ML.IntegrationTests/DataTransformation.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms.Text; @@ -11,9 +11,9 @@ using Xunit.Abstractions; using static Microsoft.ML.Transforms.HashingEstimator; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class DataTransformation : FunctionalTestBaseClass + public class DataTransformation : IntegrationTestBaseClass { public DataTransformation(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/Adult.cs b/test/Microsoft.ML.IntegrationTests/Datasets/Adult.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/Datasets/Adult.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/Adult.cs index 440515ac06..d0f764e1cb 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/Adult.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/Adult.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class for the Adult test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/CommonColumns.cs b/test/Microsoft.ML.IntegrationTests/Datasets/CommonColumns.cs similarity index 95% rename from test/Microsoft.ML.Functional.Tests/Datasets/CommonColumns.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/CommonColumns.cs index 3081c1d7b1..9f54184af7 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/CommonColumns.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/CommonColumns.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class to hold a feature column. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/HousingRegression.cs b/test/Microsoft.ML.IntegrationTests/Datasets/HousingRegression.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/Datasets/HousingRegression.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/HousingRegression.cs index 1ca055d212..001046c3cf 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/HousingRegression.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/HousingRegression.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A schematized class for loading the HousingRegression dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/Iris.cs b/test/Microsoft.ML.IntegrationTests/Datasets/Iris.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Datasets/Iris.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/Iris.cs index 7877069f21..ee487b45dc 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/Iris.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/Iris.cs @@ -6,7 +6,7 @@ using System; using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class for the Iris test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs b/test/Microsoft.ML.IntegrationTests/Datasets/MnistOneClass.cs similarity index 95% rename from test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/MnistOneClass.cs index 6329a80b0b..40ad9b8910 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/MnistOneClass.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { internal sealed class MnistOneClass { diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/Sentiment.cs b/test/Microsoft.ML.IntegrationTests/Datasets/Sentiment.cs similarity index 91% rename from test/Microsoft.ML.Functional.Tests/Datasets/Sentiment.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/Sentiment.cs index 2465e291b3..e2cd7e2ae6 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/Sentiment.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/Sentiment.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class for reading in the Sentiment test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TrivialMatrixFactorization.cs b/test/Microsoft.ML.IntegrationTests/Datasets/TrivialMatrixFactorization.cs similarity index 96% rename from test/Microsoft.ML.Functional.Tests/Datasets/TrivialMatrixFactorization.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/TrivialMatrixFactorization.cs index e2cf6d7128..e04f6b0de1 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TrivialMatrixFactorization.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/TrivialMatrixFactorization.cs @@ -5,7 +5,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class describing the TrivialMatrixFactorization test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs b/test/Microsoft.ML.IntegrationTests/Datasets/TypeTestData.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/TypeTestData.cs index 1d3eee5955..7b218ad10b 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/TypeTestData.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class containing one property per . diff --git a/test/Microsoft.ML.Functional.Tests/Debugging.cs b/test/Microsoft.ML.IntegrationTests/Debugging.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Debugging.cs rename to test/Microsoft.ML.IntegrationTests/Debugging.cs index b58433e157..3e89f594ef 100644 --- a/test/Microsoft.ML.Functional.Tests/Debugging.cs +++ b/test/Microsoft.ML.IntegrationTests/Debugging.cs @@ -5,16 +5,16 @@ using System.Collections.Concurrent; using System.Collections.Generic; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms.Text; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Debugging : FunctionalTestBaseClass + public class Debugging : IntegrationTestBaseClass { public Debugging(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Evaluation.cs b/test/Microsoft.ML.IntegrationTests/Evaluation.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Evaluation.cs rename to test/Microsoft.ML.IntegrationTests/Evaluation.cs index bc9f87ee8d..3f92fa98b7 100644 --- a/test/Microsoft.ML.Functional.Tests/Evaluation.cs +++ b/test/Microsoft.ML.IntegrationTests/Evaluation.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.TestFrameworkCommon.Attributes; using Microsoft.ML.Trainers; @@ -11,9 +11,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Evaluation : FunctionalTestBaseClass + public class Evaluation : IntegrationTestBaseClass { public Evaluation(ITestOutputHelper output): base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Explainability.cs b/test/Microsoft.ML.IntegrationTests/Explainability.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/Explainability.cs rename to test/Microsoft.ML.IntegrationTests/Explainability.cs index b470a63336..124137a0e7 100644 --- a/test/Microsoft.ML.Functional.Tests/Explainability.cs +++ b/test/Microsoft.ML.IntegrationTests/Explainability.cs @@ -3,19 +3,19 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { /// /// Test explainability features. /// - public class Explainability : FunctionalTestBaseClass + public class Explainability : IntegrationTestBaseClass { public Explainability(ITestOutputHelper output) : base(output) { @@ -36,13 +36,13 @@ public void GlobalFeatureImportanceWithPermutationFeatureImportance(bool saveMod // Create a pipeline to train on the housing data. var pipeline = mlContext.Transforms.Concatenate("Features", HousingRegression.Features) - .Append(mlContext.Regression.Trainers.Sdca()); + .Append(mlContext.Regression.Trainers.FastTree()); // Fit the pipeline var model = pipeline.Fit(data); IDataView transformedData; - RegressionPredictionTransformer linearPredictor; + RegressionPredictionTransformer linearPredictor; if(saveModel) { @@ -57,7 +57,7 @@ public void GlobalFeatureImportanceWithPermutationFeatureImportance(bool saveMod transformedData = loadedModel.Transform(data); // Extract linear predictor - linearPredictor = (loadedModel as TransformerChain).LastTransformer as RegressionPredictionTransformer; + linearPredictor = (loadedModel as TransformerChain).LastTransformer as RegressionPredictionTransformer; } else { diff --git a/test/Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs b/test/Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs similarity index 88% rename from test/Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs rename to test/Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs index 092040ca88..1674679214 100644 --- a/test/Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs +++ b/test/Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs @@ -12,11 +12,11 @@ using Microsoft.ML.TestFrameworkCommon.Attributes; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class FunctionalTestBaseClass : IDisposable + public class IntegrationTestBaseClass : IDisposable { - static FunctionalTestBaseClass() + static IntegrationTestBaseClass() { RootDir = TestCommon.GetRepoRoot(); DataDir = Path.Combine(RootDir, "test", "data"); @@ -31,7 +31,7 @@ static FunctionalTestBaseClass() protected static string DataDir { get; } protected ITestOutputHelper Output { get; } - public FunctionalTestBaseClass(ITestOutputHelper output) + public IntegrationTestBaseClass(ITestOutputHelper output) { //This locale is currently set for tests only so that the produced output //files can be compared on systems with other locales to give set of known @@ -39,12 +39,12 @@ public FunctionalTestBaseClass(ITestOutputHelper output) Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); #if NETFRAMEWORK - string codeBaseUri = typeof(FunctionalTestBaseClass).Assembly.CodeBase; + string codeBaseUri = typeof(IntegrationTestBaseClass).Assembly.CodeBase; string path = new Uri(codeBaseUri).AbsolutePath; var currentAssemblyLocation = new FileInfo(Directory.GetParent(path).FullName); #else // There is an extra folder in the netfx path representing the runtime identifier. - var currentAssemblyLocation = new FileInfo(typeof(FunctionalTestBaseClass).Assembly.Location); + var currentAssemblyLocation = new FileInfo(typeof(IntegrationTestBaseClass).Assembly.Location); #endif OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput"); Directory.CreateDirectory(OutDir); diff --git a/test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs b/test/Microsoft.ML.IntegrationTests/IntrospectiveTraining.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs rename to test/Microsoft.ML.IntegrationTests/IntrospectiveTraining.cs index eb4361f953..77eebc24fa 100644 --- a/test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs +++ b/test/Microsoft.ML.IntegrationTests/IntrospectiveTraining.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; @@ -15,9 +15,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class IntrospectiveTraining : FunctionalTestBaseClass + public class IntrospectiveTraining : IntegrationTestBaseClass { public IntrospectiveTraining(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj b/test/Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj similarity index 96% rename from test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj rename to test/Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj index 29caed1c00..d925c75212 100644 --- a/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj +++ b/test/Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj @@ -6,6 +6,10 @@ false Project + + false + true + diff --git a/test/Microsoft.ML.Functional.Tests/ModelFiles.cs b/test/Microsoft.ML.IntegrationTests/ModelFiles.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/ModelFiles.cs rename to test/Microsoft.ML.IntegrationTests/ModelFiles.cs index 6312073c49..26102de5f9 100644 --- a/test/Microsoft.ML.Functional.Tests/ModelFiles.cs +++ b/test/Microsoft.ML.IntegrationTests/ModelFiles.cs @@ -9,16 +9,16 @@ using System.Text.RegularExpressions; using Microsoft.ML.Calibrators; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Transforms; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public partial class ModelFiles : FunctionalTestBaseClass + public partial class ModelFiles : IntegrationTestBaseClass { public ModelFiles(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/ONNX.cs b/test/Microsoft.ML.IntegrationTests/ONNX.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/ONNX.cs rename to test/Microsoft.ML.IntegrationTests/ONNX.cs index 28e5993424..e6a317081c 100644 --- a/test/Microsoft.ML.Functional.Tests/ONNX.cs +++ b/test/Microsoft.ML.IntegrationTests/ONNX.cs @@ -4,7 +4,7 @@ using System.IO; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.TestFrameworkCommon.Attributes; using Microsoft.ML.Trainers; @@ -12,9 +12,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class ONNX : FunctionalTestBaseClass + public class ONNX : IntegrationTestBaseClass { // These two members are meant to be changed // Only when manually testing the Onnx GPU nuggets diff --git a/test/Microsoft.ML.Functional.Tests/Prediction.cs b/test/Microsoft.ML.IntegrationTests/Prediction.cs similarity index 96% rename from test/Microsoft.ML.Functional.Tests/Prediction.cs rename to test/Microsoft.ML.IntegrationTests/Prediction.cs index 657cb20fcb..40df4c104b 100644 --- a/test/Microsoft.ML.Functional.Tests/Prediction.cs +++ b/test/Microsoft.ML.IntegrationTests/Prediction.cs @@ -6,15 +6,15 @@ using System.Collections.Generic; using Microsoft.ML.Calibrators; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class PredictionScenarios : FunctionalTestBaseClass + public class PredictionScenarios : IntegrationTestBaseClass { public PredictionScenarios(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/SchemaDefinitionTests.cs b/test/Microsoft.ML.IntegrationTests/SchemaDefinitionTests.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/SchemaDefinitionTests.cs rename to test/Microsoft.ML.IntegrationTests/SchemaDefinitionTests.cs index c6c588857d..9a066eae6a 100644 --- a/test/Microsoft.ML.Functional.Tests/SchemaDefinitionTests.cs +++ b/test/Microsoft.ML.IntegrationTests/SchemaDefinitionTests.cs @@ -9,9 +9,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class SchemaDefinitionTests : FunctionalTestBaseClass + public class SchemaDefinitionTests : IntegrationTestBaseClass { private MLContext _ml; diff --git a/test/Microsoft.ML.Functional.Tests/Training.cs b/test/Microsoft.ML.IntegrationTests/Training.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/Training.cs rename to test/Microsoft.ML.IntegrationTests/Training.cs index 26b268d2d6..582d1cd1a7 100644 --- a/test/Microsoft.ML.Functional.Tests/Training.cs +++ b/test/Microsoft.ML.IntegrationTests/Training.cs @@ -4,16 +4,16 @@ using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Training : FunctionalTestBaseClass + public class Training : IntegrationTestBaseClass { public Training(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Validation.cs b/test/Microsoft.ML.IntegrationTests/Validation.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Validation.cs rename to test/Microsoft.ML.IntegrationTests/Validation.cs index 50ed4a1698..78f82cf17f 100644 --- a/test/Microsoft.ML.Functional.Tests/Validation.cs +++ b/test/Microsoft.ML.IntegrationTests/Validation.cs @@ -5,7 +5,7 @@ using System; using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; @@ -13,9 +13,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Validation : FunctionalTestBaseClass + public class Validation : IntegrationTestBaseClass { public Validation(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/xunit.runner.json b/test/Microsoft.ML.IntegrationTests/xunit.runner.json similarity index 100% rename from test/Microsoft.ML.Functional.Tests/xunit.runner.json rename to test/Microsoft.ML.IntegrationTests/xunit.runner.json diff --git a/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj b/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj index b211da7378..4e8f8106ab 100644 --- a/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj +++ b/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs index 81f9810b00..13461fec6b 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs @@ -202,7 +202,7 @@ public void TestMLRWithStats() CompareNumbersWithTolerance(stats.Deviance, 45.79, digitsOfPrecision: 2); CompareNumbersWithTolerance(stats.NullDeviance, 329.58, digitsOfPrecision: 2); #else - CompareNumbersWithTolerance(stats.Deviance, 45.35, digitsOfPrecision: 2); + CompareNumbersWithTolerance(stats.Deviance, 45.35, digitsOfPrecision: 0); CompareNumbersWithTolerance(stats.NullDeviance, 329.58, digitsOfPrecision: 2); #endif //Assert.Equal(14, stats.ParametersCount); diff --git a/tools-local/Microsoft.ML.InternalCodeAnalyzer/BaseTestClassAnalyzer.cs b/tools-local/Microsoft.ML.InternalCodeAnalyzer/BaseTestClassAnalyzer.cs index 34f90e846e..1a595eb959 100644 --- a/tools-local/Microsoft.ML.InternalCodeAnalyzer/BaseTestClassAnalyzer.cs +++ b/tools-local/Microsoft.ML.InternalCodeAnalyzer/BaseTestClassAnalyzer.cs @@ -51,7 +51,7 @@ private sealed class AnalyzerImpl private readonly Compilation _compilation; private readonly INamedTypeSymbol _factAttribute; private readonly INamedTypeSymbol _baseTestClass; - private readonly INamedTypeSymbol _FTbaseTestClass; + private readonly INamedTypeSymbol _ITbaseTestClass; private readonly ConcurrentDictionary _knownTestAttributes = new ConcurrentDictionary(); public AnalyzerImpl(Compilation compilation, INamedTypeSymbol factAttribute) @@ -59,7 +59,7 @@ public AnalyzerImpl(Compilation compilation, INamedTypeSymbol factAttribute) _compilation = compilation; _factAttribute = factAttribute; _baseTestClass = _compilation.GetTypeByMetadataName("Microsoft.ML.TestFramework.BaseTestClass"); - _FTbaseTestClass = _compilation.GetTypeByMetadataName("Microsoft.ML.Functional.Tests.FunctionalTestBaseClass"); + _ITbaseTestClass = _compilation.GetTypeByMetadataName("Microsoft.ML.IntegrationTests.IntegrationTestBaseClass"); } public void AnalyzeNamedType(SymbolAnalysisContext context) @@ -90,13 +90,13 @@ public void AnalyzeNamedType(SymbolAnalysisContext context) private bool ExtendsBaseTestClass(INamedTypeSymbol namedType) { if (_baseTestClass is null && - _FTbaseTestClass is null) + _ITbaseTestClass is null) return false; for (var current = namedType; current is object; current = current.BaseType) { if (Equals(current, _baseTestClass) || - Equals(current, _FTbaseTestClass)) + Equals(current, _ITbaseTestClass)) return true; }