Fix Zip-Nuget-Java Packaging Pipeline (#7208)

* Ignore test failures due to opset support

* skip identity sequence test

* plus fixes
This commit is contained in:
Ashwini Khade 2021-04-05 10:58:13 -07:00 committed by GitHub
parent 3ee9b0ec4d
commit e7c5dcd572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -790,6 +790,7 @@ namespace Microsoft.ML.OnnxRuntime.Tests
{ "test_training_dropout_default_mask", "node test error"},
{ "test_min_int8", "node test error"},
{ "test_cast_FLOAT_to_STRING", "node test error"},
{ "test_identity_sequence", "data type not supported"}
};
// The following models fails on nocontribops win CI
@ -1022,7 +1023,18 @@ namespace Microsoft.ML.OnnxRuntime.Tests
catch (Exception ex)
{
var msg = $"Opset {opset}, Model {modelName}: ModelFile = {onnxModelFileName} error = {ex.Message}";
throw new Exception(msg + "\n" + ex.StackTrace);
if(ex.Message.Contains("ONNX Runtime only *guarantees* support for models stamped with official released onnx opset versions"))
{
// If the exception is thrown because the opset version of the test model is
// not supported by ONNXRuntime yet, then ignore the test and proceed.
// ORT allows commits from ONNX master and in such cases we do come across new opsets which are
// not supported in ORT yet. In order to force these tests to run set env var ALLOW_RELEASED_ONNX_OPSET_ONLY=0
output.WriteLine("Skipping the model test as the latest ONNX opset is not supported yet. Error Message: " + msg);
}
else
{
throw new Exception(msg + "\n" + ex.StackTrace);
}
}
}