Grader Error: Not able to detect variables

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

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.

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!

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!

Ok will check! Thanks!

1 Like

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!

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.

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.

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.

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.

1 Like

Awesome! Glad it worked this time!

1 Like

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

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

can you help???

how?? add a photo please

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

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.

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

1 Like

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

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

sir still getting error