Skip to content

Commit f2499a3

Browse files
committed
onnx 1.13.1 test data
1 parent dc5f9fa commit f2499a3

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,30 @@ public void TestPretrainedModelsWithOrtValue(string opsetDir, string modelName)
934934
[MemberData(nameof(GetSkippedModelForTest), Skip = "Skipped due to Error, please fix the error and enable the test")]
935935
private void TestPreTrainedModels(string opsetDir, string modelName, bool useOrtValueAPIs = false)
936936
{
937+
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
938+
{
939+
var skipModels = new HashSet<string>
940+
{
941+
"test_castlike_FLOAT_to_STRING_expanded",
942+
"test_castlike_FLOAT_to_BFLOAT16_expanded",
943+
"test_castlike_BFLOAT16_to_FLOAT",
944+
"test_cast_FLOAT_to_STRING",
945+
"test_castlike_FLOAT_to_BFLOAT16",
946+
"test_castlike_STRING_to_FLOAT_expanded",
947+
"test_castlike_STRING_to_FLOAT",
948+
"test_cast_STRING_to_FLOAT",
949+
"test_castlike_BFLOAT16_to_FLOAT_expanded",
950+
"test_cast_BFLOAT16_to_FLOAT",
951+
"test_castlike_FLOAT_to_STRING"
952+
};
953+
954+
if (skipModels.Contains(modelName))
955+
{
956+
output.WriteLine($"Skipping {modelName} on macOS");
957+
return;
958+
}
959+
}
960+
937961
var opsetDirInfo = new DirectoryInfo(opsetDir);
938962
var opset = opsetDirInfo.Name;
939963
string onnxModelFileName = null;

tools/ci_build/github/azure-pipelines/nuget/templates/test_macos.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,27 @@ stages:
3535

3636
- script: |
3737
mv $(Pipeline.Workspace)/build/drop-signed-nuget-${{ parameters.ArtifactSuffix }} $(Build.BinariesDirectory)/nuget-artifact
38-
mv $(Pipeline.Workspace)/build/onnxruntime-osx $(Build.BinariesDirectory)/testdata
38+
39+
# Artifact is a folder containing tgz. Extract it to testdata.
40+
mkdir -p $(Build.BinariesDirectory)/testdata
41+
tar -xzf $(Pipeline.Workspace)/build/onnxruntime-osx/*.tgz -C $(Build.BinariesDirectory)/testdata
42+
43+
# Ensure libcustom_op_library.dylib is where EndToEndTests expects it (testdata/testdata)
44+
mkdir -p $(Build.BinariesDirectory)/testdata/testdata
45+
find $(Build.BinariesDirectory)/testdata -name "libcustom_op_library.dylib" -exec cp {} $(Build.BinariesDirectory)/testdata/testdata/ \;
46+
3947
4048
- template: get-nuget-package-version-as-variable.yml
4149
parameters:
4250
packageFolder: '$(Build.BinariesDirectory)/nuget-artifact'
4351

52+
- script: |
53+
git submodule update --init cmake/external/onnx
54+
cd cmake/external/onnx
55+
git checkout v1.13.1
56+
cd ../../..
57+
displayName: 'Initialize ONNX submodule for test data (pinned to v1.13.1 since new data types like float8 is not supported in nuget)'
58+
4459
- script: |
4560
$(Build.SourcesDirectory)/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \
4661
$(Build.BinariesDirectory)/nuget-artifact \

0 commit comments

Comments
 (0)