Skip to content

Commit fda3aca

Browse files
committed
add: exit TrainCheck with the instrumented program's returncode
1 parent 9c904f5 commit fda3aca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mldaikon/collect_trace.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,11 @@ def is_path_md_output_dir(output_dir: str) -> bool:
551551
print(f"An error occurred: {e}")
552552

553553
if return_code != 0:
554-
logging.error(f"Program exited with code {return_code}, skipping analysis.")
554+
# exit with error code
555+
logger.error(
556+
"The program exited with error code %d, please check the logs for more details",
557+
return_code,
558+
)
559+
exit(return_code)
555560

556561
logger.info("Trace collection done.")

0 commit comments

Comments
 (0)