All tests passed for all cells but grader gives me 88%, W2 1st Assignment

Hi Team,

I have an issue. My notebook shows all tests passed for all cells, however I only get 88%, can anyone help me understand what is wrong with my code?

Thank you

hi @Cristina_Dragomir

Would you mind sharing your homework notebook with me so I can try to find something that might be leading o this grade?

To do that, click in my avatar and hit the message button.

Thanks!

Your code doesn’t pass one of the unit tests the grader uses.

Passing the tests in the notebook does not prove your code is perfect.

Typical reasons for this situation include:

  • using global variables from the notebook within your functions.
  • hard-coding a value or index that should be a variable.
1 Like

Hi @TMosh, thanks, I thought this might be the case too, however, I still believe understanding what and where I missed anything could help me improve my code. At this point, receiving only 88% doesn’t help me at all as I have no idea what I can do better.

What does it say under “Show grader output”? Sometimes it will tell you which function was marked incorrect. Although there are some cases in which it doesn’t, but that’s the first thing to check. If that doesn’t give any further info, then we have other ways to debug.

1 Like

Hi @paulinpaloalto , thanks! That’s where I went first, before posting here. It only says : "Tests failed on 1 cell(s)! These tests could be hidden. Please check your submission.”
I did check the submission, and then rechecked and resubmitted, still the same result and response :slight_smile:
I am not worried as I have passed the assignment even with 88%, the only thing for me is that I am here to learn and not knowing where I was wrong won’t help me in the next assignements :slight_smile:
Thanks

Hello Cristina,

You didn’t mention your week assignment name, in case if mentor could get any idea about your issue.

Regards
DP

Done, thanks!

Hi, Cristina.

Do you mean that you found the solution? If not please check your DMs for a message from me.

Paul

No, I was replying to the previous message where I’ve been asked to add the week into the subject of the post, sorry for not tagging the right person :slight_smile:

Lol even I thought you got the solution the way you replied :slight_smile: So I didn’t follow through.

Regards
DP

Hello Cristina,

your submission will show this part (check the image) in which it will mention which grader cell failed to pass.

Once you know which cell has failed, you know where to do the correction

I had a DM conversation with Cristina. It turns out that the grader somehow does not give the function name in some cases: it just says “those tests are hidden”. We’ve asked the course staff about this on multiple occasions and apparently there is some limitation in the way the coursera grading platform works.

But we found the problem: there was a mistake in basic_sigmoid that turns out to pass the limited test case in the notebook.

1 Like