C1W1 Grader Output Error:: all the tests have been passed but the grader shows error

[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W1_Assignment/C1W1_Assignment.ipynb’
[ValidateApp | INFO] Executing notebook with kernel: python3
2022-06-30 14:13:02.608764: 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-06-30 14:13:02.608842: 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-06-30 14:13:02.608853: 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-06-30 14:13:04.424319: 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-06-30 14:13:04.424356: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2022-06-30 14:13:04.424379: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (ip-10-2-120-81.ec2.internal): /proc/driver/nvidia/version does not exist
2022-06-30 14:13:04.424525: 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-06-30 14:13:04.431790: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2999995000 Hz
2022-06-30 14:13:04.433505: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55f02d09cbf0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2022-06-30 14:13:04.433543: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Tests failed on 4 cell(s)! These tests could be hidden. Please check your submission.

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 'val' 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 'val_Y' 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_val_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 @Shahabud_Din,

This is odd. One possibility is that the grader is trying to grade an un-edited version of the assignment. The grader will test against using the original filename (C1W1_Assignment, in this case), so if you made a copy and edited that file, that could be the problem.

Another possibility is if you inadvertently changed the URI path. Please take a look at this other post for more details and post back here after you try out the suggestions.

I haven’t made a copy of the notebook, nor have I changed the URI and I am still getting the error. I have checked both the discussions section as well as the Discourse but no one has given a solution.

Hmm. It’s working OK for me. Can you DM me your .ipynb and I’ll look for a difference that might be causing the problem.

I solved it, there was a mistake with splitting the data.

What did you do in this part, what did you change in it?
This is my code, what do you think about it?
`# split df into 80:20 train and test sets
train, test = train_test_split(df, test_size=.2, random_state = 1)

split train into 80:20 train and val sets

train, val = train_test_split(train, test_size=.2, random_state = 1)`

@Mohamed_Bakrey_Mahmo, your code looks fine, except for the ` at the end of the line:

train, val = train_test_split(train, test_size=.2, random_state = 1)`

Is that ` in your actual code? If so, try removing it. It may be what’s throwing off the grader.

Just to confirm - you’re getting the same error as shown above as your first error? This one:

---------------------------------------------------------------------------
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 'val' is not defined
==========================================================================================

That means the grader doesn’t know val is defined, but you are defining it - unless that ` or something else extraneous in the cell is throwing the grader off. Check the cell for anything suspicious.

You can also try refreshing your workspace if you can’t see anything, but start with checking out that ` and/or anything else suspicious in that cell. If you do need to try refreshing, instructions are here - scroll down to the part about refreshing: