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
Often times the generated code by a model contained if name == "main": but none of this code was getting executed because the exec_globals being passed to exec in unsafe_execute was an empty dictionary so the built-in __name__ global variable (like all global variables) did not exist anymore in the namespace for the generated code and hence the main function in the generated code never got called. The main function not getting called resulted in an empty .pred file (the file was created because the file open statement was added separately outside of the generated code's main function) and this resulted in the judge declaring that the answer to the unit test was wrong because it did not match the expected output (because it was comparing the empty prediction file contents with the ground truth file which was not empty). Please see PR #4 for the fix.
The text was updated successfully, but these errors were encountered:
Often times the generated code by a model contained if name == "main": but none of this code was getting executed because the
exec_globals
being passed toexec
inunsafe_execute
was an empty dictionary so the built-in__name__
global variable (like all global variables) did not exist anymore in the namespace for the generated code and hence the main function in the generated code never got called. The main function not getting called resulted in an empty.pred
file (the file was created because the file open statement was added separately outside of the generated code's main function) and this resulted in the judge declaring that the answer to the unit test was wrong because it did not match the expected output (because it was comparing the empty prediction file contents with the ground truth file which was not empty). Please see PR #4 for the fix.The text was updated successfully, but these errors were encountered: