Week 2 assignment grading not working


I am having an issue with the week 2 assignment notebook.

My code is correct for all sections (unit tests work fine and results match) but when I submit the notebook, I only get the full points for sections 1:3, and get 0 for 4:6.

Looking at the detail of the grades on the right, I see that there’s a data type problem: for section 4 and 6 it expects a function and for section 5 a float, but instead it gets a NoneType (see below an example). However if I check the type from within the notebook, I see that the types are actually correct (and again, the unit tests are ok). I’ve reloaded multiple times but the issue persists.

In case that can help, the lab ID is jdbkevpatfjt.

Would you be able to look into it?

Thank you!

This is an example of the detail I see in the grades:

Failed test case: Object augmented_to_ref has incorrect type…
<class ‘function’>,
but got:
<class ‘NoneType’>.

Output of type(augmented_to_ref) when I execute it in the notebook:

Hey @Marion_Louvel,
Welcome, and we are glad that you could become a part of our community :partying_face:

Can you please check this thread out, last reply to be specific?


1 Like

Hey @Marion_Louvel,
I guess the issue lies in hard-coding some of the variables. Although I am not sure about this, but can you please try the alternative route once.

For instance, in your implementation of augmented_to_ref, you have hard-coded the shape for b in the first line of code. Can you deduce it from b? Please do the same thing for exercise 5 as well, i.e., instead of hard-coding x_1, x_2, and so on, please write them in terms of A_ref and the other x(s). Let us know if this helps.


The grader always uses different tests than the ones in the notebook.
Your code must work in any situation (any size of data set, etc).

Hi both, thank you for the feedback! I’ve edited the code to replace any hard-coding I could find, but I still have a 0 grade to those last exercises. @Elemento if that’s ok, I’ll send you the file again via DM. Would be great to get your feedback and thank you already @Elemento & @TMosh for all your help!

Hey @Marion_Louvel,
I just checked your notebook. You have added the comment of “Grade Up To Here” in the code cell corresponding to Exercise 3, and that’s why the grader is not grading your exercises further. Please remove that comment, save your notebook, and submit it again.


Ohhhhh so silly, my apologies! It’s removed and validated now, thank you!!