Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
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
22 changes: 22 additions & 0 deletions Microsoft.ML.sln
Original file line numberDiff line numberDiff line change
Expand Up@@ -170,6 +170,10 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.ML.FSharp.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.PerformanceTests", "test\Microsoft.Data.Analysis.PerformanceTests\Microsoft.Data.Analysis.PerformanceTests.csproj", "{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TorchSharp.Tests", "test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj", "{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.TensorFlow.Tests", "test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj", "{763FF013-8309-4680-A769-B54E7BB99612}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand DownExpand Up@@ -798,6 +802,22 @@ Global
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|Any CPU.Build.0 = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.ActiveCfg = Release|Any CPU
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD}.Release|x64.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Debug|x64.Build.0 = Debug|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|Any CPU.Build.0 = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.ActiveCfg = Release|Any CPU
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D}.Release|x64.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|Any CPU.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.ActiveCfg = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Debug|x64.Build.0 = Debug|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|Any CPU.Build.0 = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.ActiveCfg = Release|Any CPU
{763FF013-8309-4680-A769-B54E7BB99612}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand DownExpand Up@@ -881,6 +901,8 @@ Global
{C3D82402-F207-4F19-8C57-5AF0FBAF9682} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{041CB5CD-5832-413E-A894-D9DBED210B16} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{FB8A8823-CC6C-4C2F-8539-05FBFB7C91CD} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{AB8D68F1-6C3E-41FD-B0EC-A093E009341D} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{763FF013-8309-4680-A769-B54E7BB99612} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
2 changes: 2 additions & 0 deletions eng/helix.proj
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,6 +70,8 @@
<MyProjects Remove="..\test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.Benchmarks.Tests\Microsoft.ML.Benchmarks.Tests.csproj" />
<MyProjects Remove="..\test\Microsoft.ML.TorchSharp.Tests\Microsoft.ML.TorchSharp.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
<MyProjects Remove="..\test\Microsoft.ML.TensorFlow.Tests\Microsoft.ML.TensorFlow.Tests.csproj" Condition="'$(BuildArchitecture)' != 'x64'"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Core/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)]
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Data/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TorchSharp.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,5 +6,6 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: WantsToBeBestFriends]
2 changes: 1 addition & 1 deletion src/Microsoft.ML.TensorFlow/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@
using System.Runtime.CompilerServices;
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Vision" + PublicKey.Value)]
1 change: 1 addition & 0 deletions src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]

[assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)]
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.Vision/Properties/AssemblyInfo.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,3 +6,4 @@
using Microsoft.ML;

[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)]
[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow.Tests" + PublicKey.TestValue)]
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn)</NoWarn>
<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@
<StrongNameKeyId>Test</StrongNameKeyId>
<!-- Temporary workaround for https://github.com/dotnet/roslyn/issues/64365 -->
<LangVersion>10.0</LangVersion>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
Expand DownExpand Up@@ -37,6 +36,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,6 @@
using Xunit;
using Xunit.Abstractions;

[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace Microsoft.ML.Core.Tests.UnitTests
{
public class TestResourceDownload : BaseTestBaseline
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TensorFlow.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
Comment thread
michaelgsharp marked this conversation as resolved.
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\Microsoft.ML.Tests\Microsoft.ML.Tests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions test/Microsoft.ML.Tests/DatabaseLoaderTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,6 +233,14 @@ public void TestLoadDatetimeColumnWithNullValue()
connection.Open();
using (var command = new SQLiteCommand(connection))
{
// Make sure the table doesn't exist.
command.CommandText = """
BEGIN;
DROP TABLE IF EXISTS Datetime;
COMMIT;
""";
command.ExecuteNonQuery();

Comment thread
michaelgsharp marked this conversation as resolved.
command.CommandText = """
BEGIN;
CREATE TABLE IF NOT EXISTS Datetime (datetime Datetime NULL);
Expand Down
23 changes: 0 additions & 23 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,10 +4,7 @@
<AssemblyName>Microsoft.ML.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StrongNameKeyId>Test</StrongNameKeyId>
<NoWarn>$(NoWarn)</NoWarn>

<!-- Remove once we have resolved the TorchSharp issue. -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<!-- Import the test signing certificate -->
Expand All@@ -16,7 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj" />
Expand All@@ -32,21 +28,12 @@
<ProjectReference Include="..\..\src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">
<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FastTreeNative" />
Expand All@@ -60,16 +47,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.TensorFlow.TestModels" Version="$(MicrosoftMLTensorFlowTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.TestDatabases" Version="$(MicrosoftMLTestDatabasesVersion)" />
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimeVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionVersion)" />
<PackageReference Include="System.Data.SQLite.Core" Version="$(SystemDataSQLiteCoreVersion)" />
<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand All@@ -78,13 +62,6 @@
</Content>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindExInput.txt" />
<EmbeddedResource Include="ExpressionLanguageTests\TestData\ExprBindInput.txt" />
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.ML.TorchSharp.Tests</AssemblyName>
<StrongNameKeyId>Test</StrongNameKeyId>

</PropertyGroup>

<!-- Import the test signing certificate -->
<Import Project="../Cert.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.ML.TorchSharp\Microsoft.ML.TorchSharp.csproj" Condition="'$(TargetArchitecture)' == 'x64'" />
<ProjectReference Include="..\Microsoft.ML.TestFramework\Microsoft.ML.TestFramework.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'x64'">

@ericstjericstjJan 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider trying out @ViktorHofer's solution for excluding the entire project from the SLN traversal. dotnet/xdt@main...DoCoolFiltering

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I thought I would do that in another PR so that we can start getting the benefits now of the faster tests/no timeouts. And I have excluded this assembly from helix testing as well for non x64, so it won't affect those tests at all either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not fully understand @ericstj comment. This looks excluding some source file when running on x64. How excluding the entire project work here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this was just a consider. I'm completely fine excluding things as you did, since it looks like we already do that for a lot of other projects. If you feel strongly about not building this then file an issue on that.

<Compile Remove="TextClassificationTests.cs" />
<Compile Remove="ObjectDetectionTests.cs" />
<Compile Remove="NerTests.cs" />
<Compile Remove="QATests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 'x64'">
<PackageReference Include="libtorch-cpu-win-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Windows')) AND '$(TargetArchitecture)' == 'x64'" />
<!-- <PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" Condition="$([MSBuild]::IsOSPlatform('Windows'))" /> -->
<PackageReference Include="libtorch-cpu-linux-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('Linux')) AND '$(TargetArchitecture)' == 'x64'" />
<PackageReference Include="libtorch-cpu-osx-x64" Version="$(LibTorchVersion)" Condition="$([MSBuild]::IsOSPlatform('OSX')) AND '$(TargetArchitecture)' == 'x64'" />

<PackageReference Include="MathNet.Numerics.Signed" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<NativeAssemblyReference Include="MklProxyNative" />
<NativeAssemblyReference Include="MklImports" />
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
</ItemGroup>

</Project>
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,24 +4,11 @@

using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Apache.Arrow;
using ICSharpCode.SharpZipLib.Tar;
using Microsoft.Data.Analysis;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Runtime;
using Microsoft.ML.TestFramework.Attributes;
using Microsoft.ML.TorchSharp;
using Microsoft.ML.TorchSharp.NasBert;
using TorchSharp;
using TorchSharp.Modules;
using Xunit;
using Xunit.Abstractions;
using static TorchSharp.torch.utils;

namespace Microsoft.ML.Tests
{
Expand Down