You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a script exits with a non-zero return code, MLCFlow now displays a
human-readable hint alongside the exit code to help users diagnose failures
faster — without needing to look up exit codes manually.
Changes
Added _SCRIPT_EXIT_CODE_HINTS dict mapping common exit codes to advice
MLCommons CLA bot: Thank you very much for your submission; we really appreciate it. Before we can accept your contribution,
we ask that you sign the MLCommons CLA (Apache 2). Please submit your GitHub ID to our onboarding form to initiate
authorization. If you are from a MLCommons member organization, we will request that you be added to the CLA.
If you are not from a member organization, we will email you a CLA to sign. For any questions, please contact [email protected]. 0 out of 1 committers have signed the MLCommons CLA. ❌ @XXOriginalXX You can retrigger this bot by commenting recheck in this Pull Request
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you for the contribution!
Can you please remove any formatting for the existing code? - there's an autoformatter running in github action which will otherwise reformat the code again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #215
When a script exits with a non-zero return code, MLCFlow now displays a
human-readable hint alongside the exit code to help users diagnose failures
faster — without needing to look up exit codes manually.
Changes
_SCRIPT_EXIT_CODE_HINTSdict mapping common exit codes to advice_get_exit_code_hint()helper function (handles POSIX codes + curl network codes 6/7)ScriptExecutionErrorto accept and storereturn_code, appending the hint to the exception messagecall_script_module_functionto passresult["return"]asreturn_codewhen raisingTesting
Tested locally on Windows. CI workflow included.
All existing tests pass.