C1M2 Grader fails: unexpected error on submission

Hi,

In Week 2 – Module 2: The PyTorch Workflow, EMNIST Letter Detective, every time I submit the notebook I get:

“An unexpected error occurred. Please try again later.”

  • Score is always 0/50 with 0/10 for all exercises, even when the notebook runs without errors and tests pass.

  • I have tried restoring the original notebook, rerunning all cells, and resubmitting multiple times and still get the same message.

Could someone please check whether there is an issue with the autograder for this assignment or advise on next steps?

Hi @Timotheos,

Please make sure of the following:

  • The assignment you are working in and at the time of pressing “submit” button is named as C1M2_Assignment.ipynb
  • Make sure you are not using any global variables inside the exercises (using function parameters instead as you should be).

If the issue remains, let me know.

Best,
Mubsi

Hi @Mubsi ,

thanks for the reply - the filename is correct. Also, I am not using any global variables - everything is according to the coding exercise.

The issue still remains.

Best
Timotheos

@Mubsi shouldn’t these gotchas be mentioned on every graded notebook just like in dls?

So I start plain vanilla with a fresh notebook (“restored from original“) and solve the first exercise. I only modify the code within the marks. The unittest passes but I still get the unexpected error message. I finished the complete course already except for this exercise. Here is a screenshot again:

Hi @Timotheos,

I’m going to send you a direct message regarding this.

Best,
Mubsi

Once Timotheos filled all of the exercises and ran the cell which saves the model needed for grading, the grader worked as expected.

1 Like

The grader continues to struggle with giving useful feedback when an attempt is made to grade an incomplete notebook.

I have similar issue I am able to run full assignment and it seems to be running well but keep hitting the grading error when submitting

What is the detailed feedback from the grader?
Please post some screen capture images.

Hi @quantlab,

Did you run this cell before submitting the assignment for grading?

If so, and the issue remains, let me know.

Best,
Mubsi

I’m having issues with submitting the assignment
Only two passes even after receiving all test passed while running the cells

The issue has been resolved for me. Turns out that you are not able to submit a partial solution. You need to solve the complete notebook and save the model. Not saving the model at the end was causing the error most probably.

2 Likes

@Benedict09

Always create new topic instead of responding on older resolved threads. you can always link similar topics in your created post.

@Deepti_Prasad
How do I do that?
I’m new to the app

this should help you

Hi @Benedict09,

You passed 2 out of 5 tests, which is likely an indication that the grader is glitching.

Try re-submiting a couple more times and see if that helps. Usually, it does.

But if it doesn’t let me know.

Best,
Mubsi

Hi @Mubsi , I tried everything for Course 1 Module 2: programming assignment, and all the code tests passed in the notebook, while still got the same error: unexpected error.

Hi @shellmy1127,

I have reset the environment and checked, everything seems to be working now. Hopefully, it will work for you as well.

Note: These instructions only apply to students taking the course on DeepLearning.AI’s Learning Platform.

Please do the following:

  • Open the C1 M2 Assignment

  • Restore your environment: I would recommend doing this to make sure you have the latest environment, and my other recommendation would be to attempt the assignment from scratch instead of using your old solutions/notebook.

    Once your assignment opens, click on the three dots on the right side of the panel, and then click “Restore Original Version”

    Screenshot 2026-02-01 at 6.28.23 PM

  • Wait for your workspace to reset and open again. And then attempt the assignment again.

  • This assignment (which should be attempted in the notebook named C1M2_Assignment.ipynb), along with the notebook also needs the trained model for grading, so make sure you have ran every cell up to “Submission Note” markdown to ensure the train model has been saved in your workspace.

  • The click on “Submit”.

If the problem still remains even after following all of the steps above, let me know.

Best,
Mubsi

Thanks @Mubsi , I followed above steps and it works! :+1:

1 Like