# Autograder not working

**URL:** <https://community.deeplearning.ai/t/autograder-not-working/144380>\
**Category:** AI for Medical Prognosis\
**Tags:** week-module-3, week-module-2\
**Created:** [June 21, 2022, 5:57pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380 "2022-06-21T17:57:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bradley\_Merrill\_Thom](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@Bradley\_Merrill\_Thom](https://community.deeplearning.ai/u/Bradley_Merrill_Thom)\
**Post date:** [June 21, 2022, 5:57pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/1 "2022-06-21T17:57:47Z")

</div>

All of my answers are correct, but I get a zero on the autograder. The only error message I get in the notebook itself is for excercise 1, where it says "Error: Wrong shape. " The output is a float, there should be no shape issue. I believe the autograder is not working. Can someone please check?

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [June 22, 2022, 2:48pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/2 "2022-06-22T14:48:14Z")

</div>

Hi @Bradley_Merrill_Thom,

Can you share your lab ID with me ? In the assignment, when you click the top right “Help” button, a panel will open and your lab ID will be shown at the bottom.  
I shall take a look.

When you reply back, kindly tag me in the post so that I’m notified.

Thanks,  
Mubsi

---

<div class="post-metadata">

**Author:** ![Bradley\_Merrill\_Thom](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@Bradley\_Merrill\_Thom](https://community.deeplearning.ai/u/Bradley_Merrill_Thom)\
**Post date:** [June 22, 2022, 2:54pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/3 "2022-06-22T14:54:22Z")

</div>

@Mubsi Here is my lab ID qkbonadh

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [June 23, 2022, 1:40pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/4 "2022-06-23T13:40:58Z")

</div>

> [@Bradley\_Merrill\_Thom](#):
>
> qkbonadh

Hi @Bradley_Merrill_Thom,

The autograder is working fine.

You mentioned you are passing all the tests within the notebook, which you are, except for `Ex 1`’s unit test. Those, you are failing.

 ![Screenshot 2022-06-23 at 6.42.08 PM](https://global.discourse-cdn.com/dlai/original/3X/e/f/efe1b2727c0439e9e896505e8031bf273a137a49.png)

You must understand that only matching the expected outputs does not mean that you have passed the unit test, you also need to get the `All tests passed.` output as well (which also happens to be part of the expected output). Since you are failing the unit test in the notebook, you are failing the autograder test as well. And like a compiler, the autograder works in a sequential manner. If there’s a error in between, it would stop there, and not continue ahead.

As for your mistake, I have left the comment in your `Ex 1`. You were using the `isna` function, when the hints ask you to use the `isnull` function.

Best,  
Mubsi

---

<div class="post-metadata">

**Author:** ![Marco\_Kinkel](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/marco_kinkel/32/24420_2.png) [@Marco\_Kinkel](https://community.deeplearning.ai/u/Marco_Kinkel)\
**Post date:** [July 23, 2022, 11:09am UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/6 "2022-07-23T11:09:28Z")

</div>

Hi,  
I am also getting the “wrong shape” error here. The shape check fails, because my function outputs a number of datatype numpy.float64 which has the shape (), while the test case expects a result of type float, which has no shape attribute.

The solution is, to typecast the result of ‘fraction\_rows\_missing()’ to the float datatype before returning it:

```auto
def fraction_rows_missing(df):
    return float( YOUR SOLUTION HERE )

```

Best,  
Marco

---

<div class="post-metadata">

**Author:** ![plane28](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@plane28](https://community.deeplearning.ai/u/plane28)\
**Post date:** [October 6, 2022, 5:07pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/7 "2022-10-06T17:07:21Z")

</div>

Thanks, Marco!  
It helps me too

---

<div class="post-metadata">

**Author:** ![Honza\_Zbirovsky](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/honza_zbirovsky/32/72445_2.png) [@Honza\_Zbirovsky](https://community.deeplearning.ai/u/Honza_Zbirovsky)\
**Post date:** [August 22, 2023, 7:31am UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/8 "2023-08-22T07:31:18Z")

</div>

Just a hint:  
I had also the same problem. After my investigation the problem was caused by using “**np.sum()**”, but if you use a default “**sum()**” function, it will probably solve your problem with a wrong shape. At least it worked for me.

---

<div class="post-metadata">

**Author:** ![Ehab\_Mohamed\_Elgamal](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@Ehab\_Mohamed\_Elgamal](https://community.deeplearning.ai/u/Ehab_Mohamed_Elgamal)\
**Post date:** [September 30, 2023, 6:23am UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/9 "2023-09-30T06:23:47Z")

</div>

Hi Mubsi,  
I’ve been struggling with my assignment of week 2 in AI for medical prognosis course because of grading error. The outputs of all my answers have met the expectations & I modified them several times. I don’t get any error in the notebook itself. After I submit the assignment, it’ successfully submitted. At the end I get grading error with 0/6 grade. The message I get is: Please try optimizing the efficiency of your solution and submit again. You can also visit the discussion forum to see if your peers have experienced and found resolutions for similar errors, or if course staff have provided prior guidance for these errors… If the error isn’t resolved in 24 hours, please reach out to Coursera through our Help Center.  
I modifies my answer & I got even better output than I got before, which was actually closer to the expected output. However, I still get a grading error.

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [October 6, 2023, 7:23am UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/10 "2023-10-06T07:23:58Z")

</div>

Hi @Ehab_Mohamed_Elgamal,

Do you still need help with this ?

Best,  
Mubsi

---

<div class="post-metadata">

**Author:** ![Ehab\_Mohamed\_Elgamal](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@Ehab\_Mohamed\_Elgamal](https://community.deeplearning.ai/u/Ehab_Mohamed_Elgamal)\
**Post date:** [October 6, 2023, 7:49am UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/11 "2023-10-06T07:49:18Z")

</div>

Hi Mr Muhammad,  
Thanks a lot for your response. I would send you my lab Id within few hours. I’m sorry I’ve been busy for the last couple of days. I really appreciate your help.

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [October 9, 2023, 3:34pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/12 "2023-10-09T15:34:54Z")

</div>

Hi @Ehab_Mohamed_Elgamal,

Indeed, you are complicating things in your assignment.

For example, in multiple places you have set as `'max_depth': list(range(1, 101))` . This is using up a lot of resources in not just the assignment, but also for the grader. Try doing it in a simpler way.

Best,  
Mubsi

---

<div class="post-metadata">

**Author:** ![ankurmishra](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@ankurmishra](https://community.deeplearning.ai/u/ankurmishra)\
**Post date:** [December 17, 2025, 6:54am UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/13 "2025-12-17T06:54:33Z")

</div>

Hi Team,

I am facing challenge with Autograder, I see all test passed and autograder is not able to locate the numpy ‘np’ as part of the code. Can you please guide how to resolve it? Attached screenshot below for reference.

 ![Screenshot 2025-12-17 at 1.53.05 AM](https://global.discourse-cdn.com/dlai/original/3X/2/1/2106248a2ff9c374d60b4599259c6ff63366874e.png)

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [December 17, 2025, 8:04pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/14 "2025-12-17T20:04:14Z")

</div>

I recommend you start a new thread for your question.  
This thread has been cold for two years.

A new thread is more likely to draw attention from the staff and course mentors.

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [January 24, 2026, 1:57pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380/15 "2026-01-24T13:57:37Z")

</div>


