# C3\_W1\_Assignment: There was a problem grading your submission

**URL:** <https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240>\
**Category:** NLP with Sequence Models\
**Tags:** week-module-1\
**Created:** [March 30, 2022, 1:41pm UTC](https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240 "2022-03-30T13:41:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco\_Molfese](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@Francesco\_Molfese](https://community.deeplearning.ai/u/Francesco_Molfese)\
**Post date:** [March 30, 2022, 1:41pm UTC](https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240/1 "2022-03-30T13:41:00Z")

</div>

Hi,  
I have completed the programming assignment of NLP course 3 week 1. Every cell in the notebook tells me “all tests passed”. However, when i submit the code, i get 60/80 with the following message for the first two graded functions:

 ![issue](https://global.discourse-cdn.com/dlai/original/3X/d/f/dfa63e804574610437eea1853592bd8512890f5c.png)

I’m not able to find any issue in my code, since all the test evaluate correctly.  
I have already tried to restart the kernel and submit again, but it didn’t solve the problem. Stderr seems fine given that i get “all tests passed”.

---

<div class="post-metadata">

**Author:** ![ai\_curious](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/ai_curious/32/128003_2.png) [@ai\_curious](https://community.deeplearning.ai/u/ai_curious)\
**Post date:** [March 30, 2022, 2:10pm UTC](https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240/2 "2022-03-30T14:10:29Z")

</div>

The most common source of this error seems to be use of ‘global’ variables inside a graded function. The code runs fine in the Jupyter notebook because of the namespace and scope, but fails when executed as a standalone function in the autograder environment. See for example this similar thread:

> [@Problem with grading assignement - no other output](https://community.deeplearning.ai/t/problem-with-grading-assignement-no-other-output/81062):
>
> Hello. I have earned 80/100 points in week 1 assignement and for two failing tasks - Sampling decode and MBR decode - I see no other message than “There was a problem grading your submission. Check stderr for more details.” But I do not see the stderr anywhere and all the units tests are passing. For mbr decode all the provided examples take an enormous amount of time, so I am not able to debug this properly, but I still think my function is correct (and as I said, unit tests are passing)

However, this one is also very interesting and doesn’t seem to be programmer self-inflicted:

[https://community.deeplearning.ai/t/c2w1-assignment-grader-output-showed-error/7096/4](https://community.deeplearning.ai/t/c2w1-assignment-grader-output-showed-error/7096/4)

Let us know what you find out?

---

<div class="post-metadata">

**Author:** ![Francesco\_Molfese](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@Francesco\_Molfese](https://community.deeplearning.ai/u/Francesco_Molfese)\
**Post date:** [March 30, 2022, 3:18pm UTC](https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240/3 "2022-03-30T15:18:40Z")

</div>

Thank you so much, I was able to solve the problem. Using autocomplete I wrongly typed the global variable “Vocab” instead of using “vocab\_dict” given by the function.

Many thanks!

---

<div class="post-metadata">

**Author:** ![ai\_curious](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/ai_curious/32/128003_2.png) [@ai\_curious](https://community.deeplearning.ai/u/ai_curious)\
**Post date:** [March 30, 2022, 3:21pm UTC](https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240/4 "2022-03-30T15:21:55Z")

</div>

Glad that helped. I have personally invested, ok, completely wasted, several hours staring at code with a global variable inadvertently introduced through cut and paste. Whenever you pass the local unit tests but not the grader it’s a good thing to look for.

---

<div class="post-metadata">

**Author:** ![Chidsanupong\_Wongmor](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Chidsanupong\_Wongmor](https://community.deeplearning.ai/u/Chidsanupong_Wongmor)\
**Post date:** [June 22, 2022, 9:38am UTC](https://community.deeplearning.ai/t/c3-w1-assignment-there-was-a-problem-grading-your-submission/114240/5 "2022-06-22T09:38:15Z")

</div>

So Good, can you teach me haha
