Random.InvalidDType Issue
Symptom
The onnxruntime_test_all test program displays the following information indicating that the Random.InvalidDType test case fails:

Key Process and Cause Analysis
The assertion failed because the error message string content is not the same across different environment platforms.
ONNX Runtime expected "Attribute dtype does not specify a valid type in .".
The actual error message provided by the environment is "Attribute dtype does not specify a valid type." (missing "in .").
Conclusion and Solution
- Open the /path/to/ONNX_Runtime/onnxruntime/test/providers/cpu/generator/random_test.cc file.
vi /path/to/ONNX_Runtime/onnxruntime/test/providers/cpu/generator/random_test.cc
- Press : to enter command mode then enter the set nu command to display line numbers.
:set nu
- Press i to enter insert mode and change Attribute dtype does not specify a valid type in. to Attribute dtype does not specify a valid type. in lines 181, 197, 213, and 229.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Recompile and verify. For details, see Compiling the Source Code and Running and Verification.
Parent topic: Troubleshooting