-
Notifications
You must be signed in to change notification settings - Fork 25.6k
fix: Print statements causing parse error #128969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/128969
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 2b1940e with merge base 4817180 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
8b327a9
to
430acfd
Compare
The print statements for the get_workflow_type script is problematic because the shell script calling this script is expecting the output to only be JSON. This PR resolves this by removing all print statements to covert them to a message field in the JSON return output so that the output can continue to expect to be JSON while giving us the debug data we are looking for. Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
if user_list[0] == "!": | ||
print("LF Workflows are disabled for everyone. Using meta runners.") | ||
return WORKFLOW_LABEL_META | ||
MESSAGE = "LF Workflows are disabled for everyone. Using meta runners." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Does this really need to use a global variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really but I wanted to put it above so that it's documented together with the other fields that are returned to caller and immediately viewable when reading this file.
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
The print statements for the get_workflow_type script is problematic because the shell script calling this script is expecting the output to only be JSON. This PR resolves this by removing all print statements to covert them to a message field in the JSON return output so that the output can continue to expect to be JSON while giving us the debug data we are looking for.