Skip to content

Commit c94b23f

Browse files
mstfblmichaelgsharp
authored andcommitted
Added Linux & Mac changes for Arcade (#5479)
* Initial Windows, Linux, Macos builds test * Add Linux/MacOS specific CI requirements * Run Arcade CI tests on MacOS/Linux * Fix final package building * Add benchmark download to benchmars .csporj file * Print detailed status of each unit test * Install CentOS & Ubuntu build dependencies * Use container names to differenciate between Ubuntu & CentOS * Remove sudo usage in CentOS * Fix Linux build dependencies * Add -y param to apt install * Remove installation of Linux dependencies * Minor additions * Rename Benchmarks to PerformanceTests for Arcade * Changes * Added benchmark doc changes * Pre-merge changes
1 parent 2938f04 commit c94b23f

39 files changed

+164
-141
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Tool Runtime Dir
77
/[Tt]ools/
88
/.dotnet/
9+
/.packages/
910

1011
# User-specific files
1112
*.suo

.vsts-dotnet-ci.yml

+34-34
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,42 @@ resources:
1111
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-mlnet-20200515184230-2c829e8
1212

1313
jobs:
14-
# - template: /build/ci/job-template.yml
15-
# parameters:
16-
# name: Centos_x64_NetCoreApp31
17-
# buildScript: ./build.sh
18-
# container: CentosContainer
19-
# customMatrixes:
20-
# Debug_Build:
21-
# _configuration: Debug-netcoreapp3_1
22-
# _config_short: DI
23-
# _includeBenchmarkData: false
24-
# _targetFramework: netcoreapp3.1
25-
# Release_Build:
26-
# _configuration: Release-netcoreapp3_1
27-
# _config_short: RI
28-
# _includeBenchmarkData: true
29-
# _targetFramework: netcoreapp3.1
30-
# innerLoop: true
31-
# pool:
32-
# name: Hosted Ubuntu 1604
14+
- template: /build/ci/job-template.yml
15+
parameters:
16+
name: Centos_x64_NetCoreApp31
17+
buildScript: ./build.sh
18+
container: CentosContainer
19+
customMatrixes:
20+
Debug_Build:
21+
_configuration: Debug-netcoreapp3_1
22+
_config_short: DI
23+
_includeBenchmarkData: false
24+
_targetFramework: netcoreapp3.1
25+
Release_Build:
26+
_configuration: Release-netcoreapp3_1
27+
_config_short: RI
28+
_includeBenchmarkData: true
29+
_targetFramework: netcoreapp3.1
30+
innerLoop: true
31+
pool:
32+
name: Hosted Ubuntu 1604
3333

34-
# - template: /build/ci/job-template.yml
35-
# parameters:
36-
# name: Ubuntu_x64_NetCoreApp21
37-
# buildScript: ./build.sh
38-
# container: UbuntuContainer
39-
# innerLoop: true
40-
# pool:
41-
# name: Hosted Ubuntu 1604
34+
- template: /build/ci/job-template.yml
35+
parameters:
36+
name: Ubuntu_x64_NetCoreApp21
37+
buildScript: ./build.sh
38+
container: UbuntuContainer
39+
innerLoop: true
40+
pool:
41+
name: Hosted Ubuntu 1604
4242

43-
# - template: /build/ci/job-template.yml
44-
# parameters:
45-
# name: MacOS_x64_NetCoreApp21
46-
# buildScript: ./build.sh
47-
# innerLoop: true
48-
# pool:
49-
# name: Hosted macOS
43+
- template: /build/ci/job-template.yml
44+
parameters:
45+
name: MacOS_x64_NetCoreApp21
46+
buildScript: ./build.sh
47+
innerLoop: true
48+
pool:
49+
name: Hosted macOS
5050

5151
- template: /build/ci/job-template.yml
5252
parameters:

Microsoft.ML.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pkg", "pkg", "{D3D38B03-B55
4848
pkg\Directory.Build.props = pkg\Directory.Build.props
4949
EndProjectSection
5050
EndProject
51-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Benchmarks", "test\Microsoft.ML.Benchmarks\Microsoft.ML.Benchmarks.csproj", "{7A9DB75F-2CA5-4184-9EF5-1F17EB39483F}"
51+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.PerformanceTests", "test\Microsoft.ML.PerformanceTests\Microsoft.ML.PerformanceTests.csproj", "{7A9DB75F-2CA5-4184-9EF5-1F17EB39483F}"
5252
EndProject
5353
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Maml", "src\Microsoft.ML.Maml\Microsoft.ML.Maml.csproj", "{64F40A0D-D4C2-4AA7-8470-E9CC437827E4}"
5454
EndProject

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
1010
done
1111
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
1212

13-
"$DIR/eng/common/build.sh" --restore --build --pack --warnAsError false "$@"
13+
"$DIR/eng/common/build.sh" --restore --build --warnAsError false "$@"

build/ci/job-template.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ jobs:
5858
brew untap local/openssl |
5959
brew untap local/python2
6060
displayName: MacOS Homebrew bug Workaround
61+
# Extra MacOS step required to install OS-specific dependencies
6162
- ${{ if eq(parameters.pool.name, 'Hosted macOS') }}:
6263
- script: brew update && brew unlink [email protected] && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force
63-
displayName: Install build dependencies
64+
displayName: Install MacOS build dependencies
6465
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.name, 'Hosted Ubuntu 1604')) }}:
6566
- bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(nightlyBuildRunPath):$LD_LIBRARY_PATH"
6667
displayName: Set LD_LIBRARY_PATH for Ubuntu and CentOS to locate Native shared library in current running path
@@ -186,5 +187,5 @@ jobs:
186187
artifactName: ${{ parameters.name }} $(_config_short)
187188
artifactType: container
188189
- ${{ if eq(parameters.nightlyBuild, 'false') }}:
189-
- script: ${{ parameters.buildScript }} -pack -ci
190+
- script: ${{ parameters.buildScript }} -pack -ci
190191
displayName: Build Packages

src/Microsoft.ML.Core/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.Value)]
1414
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
1515
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
16-
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Benchmarks" + PublicKey.Value)]
16+
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
1717

1818
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
1919
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]

src/Microsoft.ML.CpuMath/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
[assembly: InternalsVisibleTo("Microsoft.ML.Sweeper" + PublicKey.Value)]
1616
[assembly: InternalsVisibleTo("Microsoft.ML.TimeSeries" + PublicKey.Value)]
1717
[assembly: InternalsVisibleTo("Microsoft.ML.Transforms" + PublicKey.Value)]
18-
[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks.Tests" + PublicKey.Value)]
18+
[assembly: InternalsVisibleTo("Microsoft.ML.PerformanceTests.Tests" + PublicKey.Value)]
1919

2020
[assembly: WantsToBeBestFriends]

src/Microsoft.ML.Data/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
1313
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)]
1414
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
15-
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Benchmarks" + PublicKey.Value)]
15+
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
1616
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
1717

18-
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Benchmarks" + PublicKey.Value)]
18+
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
1919
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
2020
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
2121
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ResultProcessor" + PublicKey.Value)]

src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Microsoft.ML;
77

88
[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.Value)]
9-
[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks" + PublicKey.Value)]
9+
[assembly: InternalsVisibleTo("Microsoft.ML.PerformanceTests" + PublicKey.Value)]
1010
[assembly: InternalsVisibleTo("Microsoft.ML.ResultProcessor" + PublicKey.Value)]
1111

1212
[assembly: InternalsVisibleTo("RunTests" + InternalPublicKey.Value)]

src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj

+2
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,6 @@
123123

124124
<Target Name="Test" />
125125

126+
<Target Name="PerformanceTest"/>
127+
126128
</Project>

test/Microsoft.ML.Benchmarks.Tests/BenchmarksTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
using BenchmarkDotNet.Jobs;
1111
using BenchmarkDotNet.Loggers;
1212
using BenchmarkDotNet.Running;
13-
using Microsoft.ML.Benchmarks.Harness;
13+
using Microsoft.ML.PerformanceTests.Harness;
1414
using Microsoft.ML.TestFramework;
1515
using Microsoft.ML.TestFramework.Attributes;
1616
using Xunit;
1717
using Xunit.Abstractions;
1818

19-
namespace Microsoft.ML.Benchmarks.Tests
19+
namespace Microsoft.ML.PerformanceTests.Tests
2020
{
2121
public class TestConfig : RecommendedConfig
2222
{

test/Microsoft.ML.Benchmarks.Tests/Microsoft.ML.Benchmarks.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
4-
<ProjectReference Include="..\Microsoft.ML.Benchmarks\Microsoft.ML.Benchmarks.csproj" />
4+
<ProjectReference Include="..\Microsoft.ML.PerformanceTests\Microsoft.ML.PerformanceTests.csproj" />
55

66
<NativeAssemblyReference Include="CpuMathNative" />
77
<NativeAssemblyReference Include="MklImports" />

test/Microsoft.ML.Benchmarks/Program.cs

-27
This file was deleted.

test/Microsoft.ML.CpuMath.PerformanceTests/Microsoft.ML.CpuMath.PerformanceTests.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
-->
1111
<RuntimeIdentifier></RuntimeIdentifier>
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
13+
<IsUnitTestProject>false</IsUnitTestProject>
14+
<IsPerformanceTestProject>true</IsPerformanceTestProject>
1315
</PropertyGroup>
1416

1517
<ItemGroup>

test/Microsoft.ML.Benchmarks/BenchmarkBase.cs renamed to test/Microsoft.ML.PerformanceTests/BenchmarkBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Microsoft.ML.Runtime;
99
using Microsoft.ML.TestFrameworkCommon;
1010

11-
namespace Microsoft.ML.Benchmarks
11+
namespace Microsoft.ML.PerformanceTests
1212
{
1313
public class BenchmarkBase
1414
{

test/Microsoft.ML.Benchmarks/CacheDataViewBench.cs renamed to test/Microsoft.ML.PerformanceTests/CacheDataViewBench.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
using System;
66
using BenchmarkDotNet.Attributes;
7-
using Microsoft.ML.Benchmarks.Harness;
7+
using Microsoft.ML.PerformanceTests.Harness;
88
using Microsoft.ML.Data;
99

10-
namespace Microsoft.ML.Benchmarks
10+
namespace Microsoft.ML.PerformanceTests
1111
{
1212
[CIBenchmark]
1313
public class CacheDataViewBench : BenchmarkBase

test/Microsoft.ML.Benchmarks/FeaturizeTextBench.cs renamed to test/Microsoft.ML.PerformanceTests/FeaturizeTextBench.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using Microsoft.ML.Transforms.Text;
1212
using Xunit;
1313

14-
namespace Microsoft.ML.Benchmarks
14+
namespace Microsoft.ML.PerformanceTests
1515
{
1616
[Config(typeof(TrainConfig))]
1717
public class FeaturizeTextBench : BenchmarkBase

test/Microsoft.ML.Benchmarks/Harness/Configs.cs renamed to test/Microsoft.ML.PerformanceTests/Harness/Configs.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
using BenchmarkDotNet.Toolchains;
1010
using BenchmarkDotNet.Toolchains.CsProj;
1111
using BenchmarkDotNet.Toolchains.DotNetCli;
12-
using Microsoft.ML.Benchmarks.Harness;
12+
using Microsoft.ML.PerformanceTests.Harness;
1313

14-
namespace Microsoft.ML.Benchmarks
14+
namespace Microsoft.ML.PerformanceTests
1515
{
1616
public class RecommendedConfig : ManualConfig
1717
{

test/Microsoft.ML.Benchmarks/Harness/Metrics.cs renamed to test/Microsoft.ML.PerformanceTests/Harness/Metrics.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using BenchmarkDotNet.Reports;
1212
using BenchmarkDotNet.Running;
1313

14-
namespace Microsoft.ML.Benchmarks
14+
namespace Microsoft.ML.PerformanceTests
1515
{
1616
public abstract class WithExtraMetrics : BenchmarkBase
1717
{

test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs renamed to test/Microsoft.ML.PerformanceTests/Harness/ProjectGenerator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using BenchmarkDotNet.Toolchains;
1111
using BenchmarkDotNet.Toolchains.CsProj;
1212

13-
namespace Microsoft.ML.Benchmarks.Harness
13+
namespace Microsoft.ML.PerformanceTests.Harness
1414
{
1515
/// <summary>
1616
/// to avoid side effects of benchmarks affect each other BenchmarkDotNet runs every benchmark in a standalone, dedicated process

test/Microsoft.ML.Benchmarks/HashBench.cs renamed to test/Microsoft.ML.PerformanceTests/HashBench.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
using System;
66
using System.Linq;
77
using BenchmarkDotNet.Attributes;
8-
using Microsoft.ML.Benchmarks.Harness;
8+
using Microsoft.ML.PerformanceTests.Harness;
99
using Microsoft.ML.Data;
1010
using Microsoft.ML.Runtime;
1111
using Microsoft.ML.Transforms;
1212

13-
namespace Microsoft.ML.Benchmarks
13+
namespace Microsoft.ML.PerformanceTests
1414
{
1515
[CIBenchmark]
1616
public class HashBench : BenchmarkBase

test/Microsoft.ML.Benchmarks/Helpers/CIBenchmark.cs renamed to test/Microsoft.ML.PerformanceTests/Helpers/CIBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
namespace Microsoft.ML.Benchmarks.Harness
6+
namespace Microsoft.ML.PerformanceTests.Harness
77
{
88
/// <summary>
99
/// This attribute is used to identify the benchmarks

test/Microsoft.ML.Benchmarks/Helpers/EmptyWriter.cs renamed to test/Microsoft.ML.PerformanceTests/Helpers/EmptyWriter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.IO;
66
using System.Text;
77

8-
namespace Microsoft.ML.Benchmarks
8+
namespace Microsoft.ML.PerformanceTests
99
{
1010
// Adding this class to not print anything to the console.
1111
// This is required for the current version of BenchmarkDotNet

test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs renamed to test/Microsoft.ML.PerformanceTests/Helpers/EnvironmentFactory.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Microsoft.ML.Trainers;
88
using Microsoft.ML.Transforms;
99

10-
namespace Microsoft.ML.Benchmarks
10+
namespace Microsoft.ML.PerformanceTests
1111
{
1212
internal static class EnvironmentFactory
1313
{

test/Microsoft.ML.Benchmarks/Helpers/Errors.cs renamed to test/Microsoft.ML.PerformanceTests/Helpers/Errors.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.ML.Benchmarks
5+
namespace Microsoft.ML.PerformanceTests
66
{
77
internal class Errors
88
{

test/Microsoft.ML.Benchmarks/Helpers/ExecuteMaml.cs renamed to test/Microsoft.ML.PerformanceTests/Helpers/ExecuteMaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
using System;
66
using Microsoft.ML.Tools;
7-
namespace Microsoft.ML.Benchmarks
7+
namespace Microsoft.ML.PerformanceTests
88
{
99
internal static class ExecuteMaml
1010
{

test/Microsoft.ML.Benchmarks/ImageClassificationBench.cs renamed to test/Microsoft.ML.PerformanceTests/ImageClassificationBench.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
using System.Net.Http;
1616
using Microsoft.ML.Vision;
1717

18-
namespace Microsoft.ML.Benchmarks
18+
namespace Microsoft.ML.PerformanceTests
1919
{
2020
[Config(typeof(TrainConfig))]
2121
public class ImageClassificationBench : BenchmarkBase

test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs renamed to test/Microsoft.ML.PerformanceTests/KMeansAndLogisticRegressionBench.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// See the LICENSE file in the project root for more information.
44

55
using BenchmarkDotNet.Attributes;
6-
using Microsoft.ML.Benchmarks.Harness;
6+
using Microsoft.ML.PerformanceTests.Harness;
77
using Microsoft.ML.Calibrators;
88
using Microsoft.ML.Data;
99
using Microsoft.ML.Trainers;
1010

11-
namespace Microsoft.ML.Benchmarks
11+
namespace Microsoft.ML.PerformanceTests
1212
{
1313
[CIBenchmark]
1414
public class KMeansAndLogisticRegressionBench : BenchmarkBase

0 commit comments

Comments
 (0)