# Grader Error: Not able to detect variables

**URL:** <https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828>\
**Category:** Custom Models, Layers and Loss Functions with TF\
**Tags:** week-module-1\
**Created:** [May 30, 2022, 12:39pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828 "2022-05-30T12:39:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaditya\_Thakkar](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Aaditya\_Thakkar](https://community.deeplearning.ai/u/Aaditya_Thakkar)\
**Post date:** [May 30, 2022, 12:39pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/1 "2022-05-30T12:39:10Z")

</div>

Hello everyone

I went through all the conversations about the grader bug. I have updated the lab version, passed all public tests and clearly defined all the variables. Even after getting the desired output, I still got a 03/10 for my submission.

The name of the assignment file is: **C1W1\_Assignment**

# Grader Output: [ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W1\_Assignment/C1W1\_Assignment.ipynb’ [ValidateApp | INFO] Executing notebook with kernel: python3 2022-05-30 09:21:45.809815: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:55] Could not load dynamic library ‘libnvinfer.so.6’; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory 2022-05-30 09:21:45.809894: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:55] Could not load dynamic library ‘libnvinfer\_plugin.so.6’; dlerror: libnvinfer\_plugin.so.6: cannot open shared object file: No such file or directory 2022-05-30 09:21:45.809905: W tensorflow/compiler/tf2tensorrt/utils/py\_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. 2022-05-30 09:21:47.621702: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:55] Could not load dynamic library ‘libcuda.so.1’; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2022-05-30 09:21:47.621737: E tensorflow/stream\_executor/cuda/cuda\_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303) 2022-05-30 09:21:47.621767: I tensorflow/stream\_executor/cuda/cuda\_diagnostics.cc:156] kernel driver does not appear to be running on this host (ip-10-2-51-143.ec2.internal): /proc/driver/nvidia/version does not exist 2022-05-30 09:21:47.621921: I tensorflow/core/platform/cpu\_feature\_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA 2022-05-30 09:21:47.629790: I tensorflow/core/platform/profile\_utils/cpu\_utils.cc:94] CPU Frequency: 2999990000 Hz 2022-05-30 09:21:47.631537: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560137dcdef0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2022-05-30 09:21:47.631565: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Tests failed on 7 cell(s)! These tests could be hidden. Please check your submission.

The following cell failed:

```
# You can click `File -> Open` in the menu above and open the `utils.py` file 
# in case you want to inspect the unit tests being used for each graded function.

utils.test_white_df(white_df)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-3-8e54b75f4c04> in <module>
      2 # in case you want to inspect the unit tests being used for each graded fun...
      3 
----> 4 utils.test_white_df(white_df)

NameError: name 'white_df' is not defined

```

==========================================================================================  
The following cell failed:

```
utils.test_red_df(red_df)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-6-8b24a524685c> in <module>
----> 1 utils.test_red_df(red_df)

NameError: name 'red_df' is not defined

```

==========================================================================================  
The following cell failed:

```
utils.test_df_drop(df)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-13-02ac41180da9> in <module>
----> 1 utils.test_df_drop(df)
      2 

NameError: name 'df' is not defined

```

==========================================================================================  
The following cell failed:

```
utils.test_data_sizes(train.size, test.size, val.size)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-17-a858ae1ed80e> in <module>
----> 1 utils.test_data_sizes(train.size, test.size, val.size)
      2 

NameError: name 'train' is not defined

```

==========================================================================================  
The following cell failed:

```
utils.test_format_output(df, train_Y, val_Y, test_Y)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-22-8710fc094fd1> in <module>
----> 1 utils.test_format_output(df, train_Y, val_Y, test_Y)

NameError: name 'df' is not defined

```

==========================================================================================  
The following cell failed:

```
utils.test_norm(norm_train_X, norm_val_X, norm_test_X, train, val, test)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-26-67372534a214> in <module>
----> 1 utils.test_norm(norm_train_X, norm_val_X, norm_test_X, train, val, test)

NameError: name 'norm_train_X' is not defined

```

==========================================================================================  
The following cell failed:

```
utils.test_history(history)

```

The error was:

```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-34-bb2fa200c0ad> in <module>
----> 1 utils.test_history(history)

NameError: name 'history' is not defined

```

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [May 30, 2022, 1:47pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/2 "2022-05-30T13:47:59Z")

</div>

Hi Chris @chris.favila, I think we have a similar problem like we have encountered before. I think it was updates…I ran the lab myself and it only gets 3/10.

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [May 30, 2022, 2:07pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/3 "2022-05-30T14:07:57Z")

</div>

Hi Gent! Unfortunately, I can’t replicate the issue. I tried submitting now and got 10/10. Already sent a direct message to Aaditya so I can get a copy of the notebook. You can also send yours to me if you want so we can check if there’s a common pattern that leads to the grader bug. Thanks!

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [May 30, 2022, 2:23pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/4 "2022-05-30T14:23:01Z")

</div>

I actually ran his notebook but it passed the tests on the coursera jupyter page so I thought there might be a problem, but also the problem might be on his notebook!

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [May 30, 2022, 2:54pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/5 "2022-05-30T14:54:31Z")

</div>

Ok will check! Thanks!

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [May 30, 2022, 3:24pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/6 "2022-05-30T15:24:45Z")

</div>

Hi Aaditya! It seems you’ve modified the `URL` variables. Please use the default strings provided in the boilerplate to get the perfect score. Please only modify lines with the `# YOUR CODE HERE` tag. Hope this helps!

---

<div class="post-metadata">

**Author:** ![Aaditya\_Thakkar](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Aaditya\_Thakkar](https://community.deeplearning.ai/u/Aaditya_Thakkar)\
**Post date:** [May 30, 2022, 3:48pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/7 "2022-05-30T15:48:41Z")

</div>

Hello sir,

I tried using the default strings and did not modify any other lines except the `# YOUR CODE HERE` tag. I still got the same error.

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [May 30, 2022, 3:55pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/8 "2022-05-30T15:55:48Z")

</div>

Hmm… That is strange. Can you refresh your notebook one more time (do not put your solutions yet) and then send the blank notebook to me via direct message? Thanks.

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [May 30, 2022, 4:10pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/9 "2022-05-30T16:10:47Z")

</div>

Sorry forgot to mention to also send the notebook of your most recent attempt that is still getting the error. In your original solution, I just changed the URL strings and got the perfect score.

---

<div class="post-metadata">

**Author:** ![Aaditya\_Thakkar](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Aaditya\_Thakkar](https://community.deeplearning.ai/u/Aaditya_Thakkar)\
**Post date:** [May 30, 2022, 4:34pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/10 "2022-05-30T16:34:10Z")

</div>

Hello, Sir.  
Yes. You’re correct. From the blank notebook description, I thought that I needed to go to the particular dataset URL and modify the cell. I sincerely apologise for that. Maybe we can remove the link from the notebook and warn users not to change the URI string as a solution. Thank you very much for your time and efforts.

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [May 30, 2022, 4:39pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/11 "2022-05-30T16:39:54Z")

</div>

Awesome! Glad it worked this time!

---

<div class="post-metadata">

**Author:** ![MOHAMED\_MOTASIM\_H](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@MOHAMED\_MOTASIM\_H](https://community.deeplearning.ai/u/MOHAMED_MOTASIM_H)\
**Post date:** [February 16, 2023, 8:27pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/12 "2023-02-16T20:27:50Z")

</div>

I don’t understand what the solution is finally.  
@chris.favila

---

<div class="post-metadata">

**Author:** ![Kadali\_Harshavardhan](https://avatars.discourse-cdn.com/v4/letter/k/ecccb3/32.png) [@Kadali\_Harshavardhan](https://community.deeplearning.ai/u/Kadali_Harshavardhan)\
**Post date:** [March 26, 2023, 8:30am UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/13 "2023-03-26T08:30:32Z")

</div>

can anybody send me the notebook which has no errors. i am solve it??

---

<div class="post-metadata">

**Author:** ![Kadali\_Harshavardhan](https://avatars.discourse-cdn.com/v4/letter/k/ecccb3/32.png) [@Kadali\_Harshavardhan](https://community.deeplearning.ai/u/Kadali_Harshavardhan)\
**Post date:** [March 26, 2023, 8:36am UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/14 "2023-03-26T08:36:06Z")

</div>

> [@Grader Error: Not able to detect variables](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/13):
>
> can anybody send me the notebook which has no errors. i am solve it??

can you help???

---

<div class="post-metadata">

**Author:** ![Vipin21](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vipin21](https://community.deeplearning.ai/u/Vipin21)\
**Post date:** [April 17, 2023, 2:16pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/15 "2023-04-17T14:16:57Z")

</div>

how?? add a photo please

---

<div class="post-metadata">

**Author:** ![Wendy](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/wendy/32/8167_2.png) [@Wendy](https://community.deeplearning.ai/u/Wendy)\
**Post date:** [April 18, 2023, 10:54pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/16 "2023-04-18T22:54:10Z")

</div>

@Vipin21,  
The original problem this topic was addressing was due to the URL value being changed in this cell:

 ![Screen Shot 2023-04-18 at 3.45.25 PM](https://global.discourse-cdn.com/dlai/original/3X/b/2/b2988ac8a0f4f39237eb9338847ecc071b22ee4c.png)

Other reasons you might see a `NameError: name 'white_df' is not defined` error is if this cell was not uncommented, or if the cell was not run after it was uncommented.

Please make sure you have:

- followed the instructions at the top of the cell to uncomment the cell
- and then ONLY edit the part of the cell where it says `# YOUR CODE HERE`
- then execute the cell

As long as you don’t change anything else, `white_df` should be defined, and you should pass the unit test if you properly filled in the # YOUR CODE HERE section.

---

<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:** [April 25, 2023, 1:12am UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/17 "2023-04-25T01:12:06Z")

</div>

Wendy thank you so much for the silly mistake I was doing, just cleared the test 😬

---

<div class="post-metadata">

**Author:** ![Siya\_Ghode](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Siya\_Ghode](https://community.deeplearning.ai/u/Siya_Ghode)\
**Post date:** [February 19, 2024, 5:01pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/18 "2024-02-19T17:01:33Z")

</div>

sir ,I passed all public tests and clearly defined all the variables. Even after getting the desired output, I still got a 03/10 for my submission. same error as @Aaditya_Thakkar

---

<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:** [February 19, 2024, 5:04pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/19 "2024-02-19T17:04:28Z")

</div>

Hello @Siya_Ghode  
You are not suppose to share assignment used to grade your codes on post threads. It is against community guidelines. rather share a screenshot of your grader output showing why you failed the tests and also create a new post whenever you have any issue rather than posting on old threads as chances of misunderstanding/missing your posts getting higher.

Regards  
DP

---

<div class="post-metadata">

**Author:** ![Siya\_Ghode](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Siya\_Ghode](https://community.deeplearning.ai/u/Siya_Ghode)\
**Post date:** [February 20, 2024, 7:30pm UTC](https://community.deeplearning.ai/t/grader-error-not-able-to-detect-variables/132828/20 "2024-02-20T19:30:38Z")

</div>

sir still getting error
