I completed the assignment and am not getting any error codes after running all exercises (“All tests passed”), but when I submit the assignment, its not grading it and says try again. Can someone please help me with this. Thank you!
Is it giving any errors? If not, try Kerenl → Restart and then submit. If the issue persists, try a different browser or incognito. Let us know if it doesn’t help…
Best,
Saif.
Please post the feedback from the grader. It will tell you something about what didn’t work correctly.
Hi I restarted kernel, but got the following error under the submission section with a grade of 0%:
- Of note again is that all of my answered match the expected outcomes and I’m still receiving the “All tests passed” when I run each cell.
Cell #7. Can’t compile the student’s code. Error: AssertionError(‘Entropy must be 1 with same ammount of ones and zeros’)
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_7.py”, line 15, in
compute_entropy_test(compute_entropy)
File “/tmp/public_tests.py”, line 17, in compute_entropy_test
assert result == 1, “Entropy must be 1 with same ammount of ones and zeros”
AssertionError: Entropy must be 1 with same ammount of ones and zeros
Your code for compute_entropy() does not return the correct results for one of the tests that is run by compute_entropy_test().
You can see what the test is by opening the File menu and then the public_tests.py file.
Also, please verify that you have not re-named your notebook ipynb file.
You cannot grade a notebook whose file name has been changed.
oh its because I renamed it. I was trying to start with a clean slate, and followed the instructions provided by an individual who answered my inquiry on this forum. Instructions said to rename it and click “get the latest version” and"update lab". can you please help me with how to fix this? Thank you so much!
When you re-name a notebook, that’s only so you have a source you can use to copy your code from and paste it into the new uncompleted notebook.
When you click on the “Submit” button, the grader always uses the ipynb notebook file with the original file name. It doesn’t matter which notebook you have open when you click Submit - the grader will fetch the notebook file with the original name.
Got it! Thank you So much!!
Im having the same problem that prompted me to re-name the notebook.I loaded (I think) the correctly named lab (the original) and copied my code, but I’m getting errors (even though its the correct code bc I ran it in the renamed lab that won’t grade. Is there something I’m doing wrong here? I restarted the kernel and I am using the lab named “Decision Tree with Markdown”
** The reason why I originally asked for help with this lab (when told to rename and save) was because I was having this problem (running the correct code and getting errors)
What imsaying is that the code is running successfully in the renamed lab, but is not able to be graded. But when I run the same correct code in the original notebook, Im getting errors.
{message edited, please ignore}