# W1A3: nbgrader-part fails 60/100 with "Tests failed on 1 cell(s)!"

**URL:** <https://community.deeplearning.ai/t/w1a3-nbgrader-part-fails-60-100-with-tests-failed-on-1-cell-s/882275>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** week-module-1\
**Created:** [October 27, 2025, 10:02pm UTC](https://community.deeplearning.ai/t/w1a3-nbgrader-part-fails-60-100-with-tests-failed-on-1-cell-s/882275 "2025-10-27T22:02:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxdavb](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@zxdavb](https://community.deeplearning.ai/u/zxdavb)\
**Post date:** [October 27, 2025, 10:02pm UTC](https://community.deeplearning.ai/t/w1a3-nbgrader-part-fails-60-100-with-tests-failed-on-1-cell-s/882275/1 "2025-10-27T22:02:15Z")

</div>

When I submit the assignment for grading, I get 60/100, and also:

```plaintext
[ValidateApp | INFO] Validating '/home/jovyan/work/submitted/courseraLearner/W1A3/Gradient_Checking.ipynb'
[ValidateApp | INFO] Executing notebook with kernel: python3
Tests failed on 1 cell(s)! These tests could be hidden. Please check your submission.

```

I have tried everything:

- all tests pass - I get expected output
- reset lab files
- stuff in the link below:

> [@Help! My code is correct, but the grader gives me 0 points! - Course 1 Version](https://community.deeplearning.ai/t/help-my-code-is-correct-but-the-grader-gives-me-0-points-course-1-version/11022):
>
> An immense thank you to @paulinpaloalto for this. It is a frequent occurrence that students find that their code runs correctly when they execute it in their online notebook, even to the extent that all the test cases produce the expected results, but that the grader doesn’t accept the solution as correct. This thread represents the current state of knowledge about causes for this scenario and ways to debug the issues. 1. Fresh copy of your assignment If you believe your solution is correct,…

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [October 27, 2025, 11:08pm UTC](https://community.deeplearning.ai/t/w1a3-nbgrader-part-fails-60-100-with-tests-failed-on-1-cell-s/882275/2 "2025-10-27T23:08:22Z")

</div>

[Here’s another thread](https://community.deeplearning.ai/t/gradient-checking-w1a3-grader-stuck-at-60-local-validation-passes-please-clear-cache/842665) that describes an error on that assignment that produces that behavior. Definitely worth a look. The overall point is that you don’t need to do any type coercion on the difference value that you are computing.

---

<div class="post-metadata">

**Author:** ![zxdavb](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@zxdavb](https://community.deeplearning.ai/u/zxdavb)\
**Post date:** [October 28, 2025, 9:23am UTC](https://community.deeplearning.ai/t/w1a3-nbgrader-part-fails-60-100-with-tests-failed-on-1-cell-s/882275/3 "2025-10-28T09:23:56Z")

</div>

Thankyou!

That was the problem. I had two lines like so:

```python
difference = float(numerator / denominator)

```

The solution was to remove the type casting:

```python
difference = numerator / denominator # NOTE: was float(...)

```

I am grateful for your help - I was tearing my hair out!

* * *

_TBH, I see this as a bug - the assignment should not fail simply because I am choosing to implement what some people may consider to be best practice a la PEP484 and type checking._

_I also do not recall any warning about this elsewhere, and there were no hints to be had in the cell below._

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [October 28, 2025, 2:44pm UTC](https://community.deeplearning.ai/t/w1a3-nbgrader-part-fails-60-100-with-tests-failed-on-1-cell-s/882275/4 "2025-10-28T14:44:17Z")

</div>

Yes, I agree that the tests in the notebook should fail in a transparent way in that case. Well, either that or they should change the grader to accept your version of the code. I have filed an enhancement request about this, but the course staff has not yet had a chance to fix it. Sorry for the inconvenience!
