Problem in Grader

Hi, I am receiving the following error from grader

Cell #36. Can’t compile the student’s code. Error: NameError(“name ‘hyperparams’ is not defined”,)

I don’t know why is it coming. I have compiled all cells and none produces error.

Please help.

Hello, its pretty straight forward it means that the variable hyperparams is not defined in your program, check cell 36.

Hi @gent.spah In Cell 36 hyperparams is already defined as

hyperparams = {
‘n_estimators’: [10, 20],
‘max_depth’: [2, 5],
‘min_samples_leaf’: [0.1, 0.2],
‘random_state’ : [0]

I received warning after running cell 36 but it produces the correct output of hyperparams as

/opt/conda/lib/python3.6/site-packages/sklearn/ensemble/ DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
from numpy.core.umath_tests import inner1d
{‘n_estimators’: [10, 20],
‘max_depth’: [2, 5],
‘min_samples_leaf’: [0.1, 0.2],
‘random_state’: [0]}

So what I meant that while I am running the code it is not throwing error but in grader it is throwing error. Why is it so?

It is probable that the grader expects the name hyperparam or else, instead of the one you have given to the hyper parameters, make sure you are naming it according to instructions. About the warning it says a component of the numpy package will be discontinued in the future.