Related Issue: This is the ML4EP/SOFIE equivalent of root-project/root#21190.
In root-project/root#21190, @dpiparo explicitly asked for this to be reopened here first
Problem
The Python model generator scripts in src/SOFIE_core/test/ currently have no error handling:
LinearModelGenerator.py
Conv1dModelGenerator.py
Conv2dModelGenerator.py
Conv3dModelGenerator.py
ConvTrans2dModelGenerator.py
RecurrentModelGenerator.py
If a model export fails silently, there is no way to tell which step failed, no meaningful exit code and no validation that the .onnx file was actually created.
Proposed fix
- Wrap model export calls in
try/except so failures are caught and logged
- Validate the .onnx file exists and is non-empty after each export
- Exit with
sys.exit(1) on failure so CI can detect it
Related Issue: This is the ML4EP/SOFIE equivalent of root-project/root#21190.
In root-project/root#21190, @dpiparo explicitly asked for this to be reopened here first
Problem
The Python model generator scripts in
src/SOFIE_core/test/currently have no error handling:LinearModelGenerator.pyConv1dModelGenerator.pyConv2dModelGenerator.pyConv3dModelGenerator.pyConvTrans2dModelGenerator.pyRecurrentModelGenerator.pyIf a model export fails silently, there is no way to tell which step failed, no meaningful exit code and no validation that the
.onnxfile was actually created.Proposed fix
try/exceptso failures are caught and loggedsys.exit(1)on failure so CI can detect it