C4 W4 A1 Assignment failed with grader while running all test cases passed

D4W4 A1 Assignment failed with grader while running all tet cases passed

Below is one of the error message that showed only in the grader.

Code Cell UNQ_C2: Unexpected error (TypeError(“ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’”)) occurred during function check. We expected function verify to return verify test 1 failed. Please check that this function is defined properly.

Please investigate. Lab Id = vzgshfhe

the whole error message set is

Code Cell UNQ_C1: Function ‘triplet_loss’ is correct.
Code Cell UNQ_C2: Unexpected error (TypeError(“ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’”)) occurred during function check. We expected function verify to return verify test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C3: Function ‘who_is_it’ is correct.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

Typically these sorts of errors are caused by either using a notebook global variable inside a function, or by modifying part of the notebook in a way that breaks the grader.

Global variables are tricky because they work fine in the notebook, but they’re not available to the grader so make it crash.

I finally found and fixed in the problem in the verify() function I submitted.

Code Cell UNQ_C1: Function ‘triplet_loss’ is correct.
Code Cell UNQ_C2: Function ‘verify’ is correct.
Code Cell UNQ_C3: Function ‘who_is_it’ is correct.

The problem turned out to be simply issue of me not setting the correct boolean output. However the unit test did not report this as an error, and let me go through the entire exercise, and I happen to “forget” to check this. Turned out to be a very simple problem after all.

Thanks for your report. I’ll look into updating the unit test to catch this type of error.