I keep getting the following error message and it looks more as if it has to do with the non editable code than my code.
Cell #UNQ_C1. Can’t compile the student’s code. Error: IndexError(‘list index out of range’)
Traceback (most recent call last):
File “/home/www/app/grading/exceptions.py”, line 112, in handle_solution_errors
yield {}
File “/home/www/app/grading/abstract.py”, line 410, in _grade
output=output,
File “/home/www/app/grading/graders.py”, line 365, in call
variable_value, is_passed = self._validate(context)
File “/home/www/app/grading/graders.py”, line 349, in _validate
is_passed = self.checker_function(variable_value, self.expected_value)
File “/home/www/app/courses/mls_c2/w1/graders/graders.py”, line 70, in cell_UNQ_C1_getter
result.append(type(layer) == expected[i][0])
IndexError: list index out of range
I solved that assignment. I am battling with Module 2, week 4 programming assignment. This is the error message I get.
Cell #13. Can’t compile the student’s code. Error: TypeError(‘only integer scalar arrays can be converted to a scalar index’) Traceback (most recent call last): File “/home/www/app/grading/exceptions.py”, line 112, in handle_solution_errors yield {} File “/home/www/app/grading/abstract.py”, line 393, in _grade context = compiled_code.run(cell_index=cell.index) File “/home/www/app/grading/submission/compiled_code.py”, line 195, in run return list(self._code_items.values())[cell_num - 1].run() File “/home/www/app/grading/submission/compiled_code.py”, line 54, in run return import_module(self.import_statement, items) File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “”, line 1006, in _gcd_import File “”, line 983, in _find_and_load File “”, line 967, in _find_and_load_unlocked File “”, line 677, in _load_unlocked File “”, line 728, in exec_module File “”, line 219, in _call_with_frames_removed File “/tmp/student_solution_cells/cell_13.py”, line 15, in best_feature = get_best_split(X_train, y_train, root_indices) File “/tmp/student_solution_cells/cell_12.py”, line 77, in get_best_split information_gain = compute_information_gain(X, y, node_indices, feature) File “/tmp/student_solution_cells/cell_12.py”, line 67, in compute_information_gain subset_indices = node_indices[X[node_indices, feature] == value] TypeError: only integer scalar arrays can be converted to a scalar index