Skip to content

Helix queue testing #7034

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.1804.amd64.open
helixQueue: Ubuntu.1804[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7
helixQueue: (Ubuntu.2204.Arm64.Open)Ubuntu.2004[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that the part in brackets was the display name for the container image. In any case, I see three versions on that one line and am not sure what three things they apply to.


- template: /build/ci/job-template.yml
parameters:
Expand All @@ -75,7 +75,7 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.1804.amd64.open
helixQueue: Ubuntu.1804[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8
helixQueue: (Ubuntu.2204.Arm64.Open)Ubuntu.2004[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8

- template: /build/ci/job-template.yml
parameters:
Expand All @@ -86,7 +86,7 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.1804.amd64.open
helixQueue: Ubuntu.1804[email protected]/dotnet-buildtools/prereqs:centos-stream8-mlnet-helix
helixQueue: (Ubuntu.2204.Amd64.Open)Ubuntu.2204[email protected]/dotnet-buildtools/prereqs:centos-stream8-mlnet-helix

- template: /build/ci/job-template.yml
parameters:
Expand All @@ -97,7 +97,7 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.1804.amd64.open
helixQueue: Ubuntu.1804[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-helix
helixQueue: (Ubuntu.2204.Amd64.Open)Ubuntu.2204[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-helix

- template: /build/ci/job-template.yml
parameters:
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
innerLoop: true
pool:
vmImage: macOS-12
helixQueue: OSX.1100.Arm64.Open
helixQueue: OSX.1200.ARM64.Open

- template: /build/ci/job-template.yml
parameters:
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals 1es-windows-2019-open
helixQueue: Windows.10.Amd64.Open
helixQueue: Windows.Amd64.Server2022.Open

- template: /build/ci/job-template.yml
parameters:
Expand All @@ -183,7 +183,7 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals 1es-windows-2019-open
helixQueue: Windows.10.Amd64.Open
helixQueue: Windows.Amd64.Server2022.Open

- template: /build/ci/job-template.yml
parameters:
Expand All @@ -195,4 +195,4 @@ jobs:
pool:
name: NetCore-Public
demands: ImageOverride -equals 1es-windows-2019-open
helixQueue: Windows.10.Amd64.Open
helixQueue: Windows.Amd64.Server2022.Open
43 changes: 30 additions & 13 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ public void IrisLightGbm()
[LightGBMFact]
public void IrisLightGbmWithTimeout()
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) //sqlite does not have built-in command for sleep
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) //SQLite does not have built-in command for sleep
return;
DatabaseSource dbs = GetIrisDatabaseSource("WAITFOR DELAY '00:00:01'; SELECT * FROM {0}", 1);

// If we are on windows but still on SQLite then skip this test.
if (dbs.ProviderFactory != SqlClientFactory.Instance)
return;

var ex = Assert.Throws<System.Reflection.TargetInvocationException>(() => IrisLightGbmImpl(dbs));
Assert.Contains("Timeout", ex.InnerException.Message);
}
Expand Down Expand Up @@ -271,21 +276,33 @@ public void TestLoadDatetimeColumnWithNullValue()
/// Non-Windows builds do not support SqlClientFactory/MSSQL databases. Hence, an equivalent
/// SQLite database is used on Linux and MacOS builds.
/// </summary>
/// <returns>Return the appropiate Iris DatabaseSource according to build OS.</returns>
/// <returns>Return the appropriate Iris DatabaseSource according to build OS.</returns>
private DatabaseSource GetIrisDatabaseSource(string command, int commandTimeoutInSeconds = 30)
{
// If the windows machines have MSSQL setup we want to test with that, but if they don't we will fall back to SQLite.
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return new DatabaseSource(
SqlClientFactory.Instance,
GetMSSQLConnectionString(TestDatasets.irisDb.name),
String.Format(command, $@"""{TestDatasets.irisDb.trainFilename}"""),
commandTimeoutInSeconds);
else
return new DatabaseSource(
SQLiteFactory.Instance,
GetSQLiteConnectionString(TestDatasets.irisDbSQLite.name),
String.Format(command, TestDatasets.irisDbSQLite.trainFilename),
commandTimeoutInSeconds);
{
try
{
return new DatabaseSource(
SqlClientFactory.Instance,
GetMSSQLConnectionString(TestDatasets.irisDb.name),
String.Format(command, $@"""{TestDatasets.irisDb.trainFilename}"""),
commandTimeoutInSeconds);
}
// Catch the exception and fall back to SQLite if the server is not found or not accessible.
catch (System.Data.SqlClient.SqlException e)
{
if (!e.InnerException.Message.Contains("The server was not found or was not accessible"))
throw;
}
}

return new DatabaseSource(
SQLiteFactory.Instance,
GetSQLiteConnectionString(TestDatasets.irisDbSQLite.name),
String.Format(command, TestDatasets.irisDbSQLite.trainFilename),
commandTimeoutInSeconds);
}

private string GetMSSQLConnectionString(string databaseName)
Expand Down