I’m having issues with the module 3 assignment of course 2. The grader keeps giving 0/10 for exercises 2 and 3, eventhough it’s giving full score for 1, 4, 5 and 6. I refreshed several times, ran all cells one by one ensuring all unit tests pass, but that didn’t help.
The error messages do not make sense. For example, for exercise 2, it says:
Failed test case: Your function failed to run. Error: name ‘bert_tokenizer’ is not defined.
Expected:
None,
but got:
None.
But in the code, I can see the variable clearly assigned and the later exercises wouldn’t have worked if it was not, so it looks like something is wrong with the grader.
For exercise 3, it says:
Failed test case: Your function failed to run. Error: name ‘data_collator’ is not defined.
Expected:
None,
but got:
None.
Again, the later exercises for which the grader is giving the full score wouldn’t work if these variables were not properly assigned.
This is not necessarily true, because the grader does not just run your notebook and look at the results. It copies portions of your notebook into a separate runtime environment and runs different tests there.
For example, if you have modified your notebook in such a way that the grader cannot find your functions, then you’ll get these “not defined” errors.
I restored the original version and copied my code into the cells one by one, ensuring to only change what is between ### START CODE HERE ### and ### END CODE HERE ###, running each cell as I go, ensuring that the unit tests pass, and saving before submitting, however, the result is exactly the same.
At this point, I’m not sure what to do. Without a deeper understanding of how the grader works, I can’t really figure out why code that has achieved the target metrics and has all unit tests passing without changing any of the other cells in the notebook ends up scoring 40/60!
It looks like we’ll need to see you notebook in order to figure out what is going on. We can’t do that on a public thread, but please check your DMs for a message from me and I will also copy @tmosh on the message.
Hi @TMosh, if you’re referring to the one I uploaded to our private chat, then yes. I haven’t renamed it within the notebook on the platform, though. That would have probably caused a score of zero, I’d assume.
For anyone facing the same issue, pay attention to variables that are being passed to functions as a parameter using a different name. For example, a global variable named bert_tokenizer is being passed to the function as tokenizer. Your implementation must use the function parameter, not the global variable, otherwise the tests will work but the grader will fail.