# 6 Tests failed in nlp-course-3-week-2

**URL:** <https://community.deeplearning.ai/t/6-tests-failed-in-nlp-course-3-week-2/300330>\
**Category:** NLP with Sequence Models\
**Tags:** week-module-2\
**Created:** [March 31, 2023, 12:11pm UTC](https://community.deeplearning.ai/t/6-tests-failed-in-nlp-course-3-week-2/300330 "2023-03-31T12:11:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebabrata.r](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@sebabrata.r](https://community.deeplearning.ai/u/sebabrata.r)\
**Post date:** [March 31, 2023, 12:11pm UTC](https://community.deeplearning.ai/t/6-tests-failed-in-nlp-course-3-week-2/300330/1 "2023-03-31T12:11:39Z")

</div>

I have passed all previous 4 tests but I got “6 Tests failed” error in Exercise 5. Can you tell me how to resolve the issue

---

<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 31, 2023, 1:56pm UTC](https://community.deeplearning.ai/t/6-tests-failed-in-nlp-course-3-week-2/300330/2 "2023-03-31T13:56:54Z")

</div>

You could start by looking at the unit test code. Use File-open to find the `w2_unittest.py` file, then look for the `def unittest_test_model(target, pretrained_model):` code block

 ![Screenshot 2023-03-31 at 9.48.34 AM](https://global.discourse-cdn.com/dlai/original/3X/e/9/e98138b63b8d5293035474604df317f06ce64c32.png)

Each of those test cases is executed in sequence, and the results compared with the expected value contained in the dictionary entry. You can drill down to the individual test level in the next section of that function to see how each test case is invoked.

 ![Screenshot 2023-03-31 at 9.49.07 AM](https://global.discourse-cdn.com/dlai/original/3X/d/6/d639bd49bad2e1bce5b8cd38cf7b29ef739db398.png)

To debug, you could try instrumenting that code, or copying to a special cell in your notebook that implements it and see what is going wrong. Just be sure to work in copies that you won’t submit to the grader. Hope this helps.

---

<div class="post-metadata">

**Author:** ![sebabrata.r](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@sebabrata.r](https://community.deeplearning.ai/u/sebabrata.r)\
**Post date:** [April 5, 2023, 5:35am UTC](https://community.deeplearning.ai/t/6-tests-failed-in-nlp-course-3-week-2/300330/3 "2023-04-05T05:35:50Z")

</div>

Thanks.

I have passed all the Exercise but score is 0.

Can you tell me how to resolve this.

---

<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:** [April 5, 2023, 10:44am UTC](https://community.deeplearning.ai/t/6-tests-failed-in-nlp-course-3-week-2/300330/4 "2023-04-05T10:44:52Z")

</div>

If your code passes the notebook unit tests, but fails the grader (assuming the grader is accessible and you work has been saved and submitted etc) the problem is often use of global variables instead of local parameters within one of the graded functions. Always helpful to post the grader feedback, even if it seems obtuse.
