While submitting my assignment of C3W4 AB Testing I am getting 0 grade even though my all test cases passed. Error is “Failed test case: degrees_of_freedom has incorrect type. Expected: <class ‘function’>, but got: <class 'NoneType>”. Please help me to resolve this issue.
That error message is pretty specific. Where is degrees_of_freedom defined in your code? Is there any way it can end up as “None”?
The other thing to consider is that it’s not clear that clicking “Submit” to the grader will do an automatic “Save” for you. Perhaps the grader is seeing an older version of the code than what you are looking at. Try clicking “Save” and then “Submit” and see if the error persists.
Hi @paulinpaloalto thanks for your reply. degree_of_freedom is a function in the code which takes some arguments and returns a value. Also, it is not the only function in which I am getting this error, rather in every exercise’s function I am getting the same error, the function name is different, but error is same. I also tried submitting after saving the notebook, still error persists.
It sounds like your notebook must be structurally damaged in some way. I’ll send you a DM about how to share your code with me for further analysis.
It turns out that the issue was that
#grade-up-to-here
tags had been left in all the functions. That causes the grader to stop reading after the first function where it encounters that tag (apparently) and so none of the subsequent functions are even defined.
Note that how the graders actually work is a “black box”: I don’t claim to have a valid mental model for what is going inside that magic black box. Not all courses have graders that support the “grade up to here” tags, but M4ML apparently does. Caveat emptor or “use with care” is the operative principle here.
Thank you so much. Now its working.