C2_W4_Decision_Tree_with_Markdown Kernel Dies


I’m experiencing an issue with C2_W4_Decision_Tree_with_Markdown every time I run the cell for compute_information_gain_test. All runs well up to that point and all tests pass, but as soon as I run that cell the Kernel dies and gives me the pop-up alert that it is restarting but doesn’t appear to actually do so (“Dead Kernel” warning remains up top until I restart it.) I’ve ensured that no other notebooks are running, and after restarting the kernel and re-running all the previous cells sequentially, the same issue recurs. I’ve ensured that there is sufficient local memory, shut down everything else running, did a full shutdown on my machine and reopened the assignment a few times now. Every attempt has ended with the same result. I checked all my code against the hints provided, and can neither find nor think of anything that could be causing this to occur. There doesn’t appear to be any other errors thrown either. Just appears to kill the kernel EVERY SINGLE TIME…Any advice would be greatly appreciated. Many thanks in advance!

Maybe your compute_information_gain() function contains an infinite loop, when run using the data set in the unit test.

Another possibility is if you added some diagnostic “print()” statements inside the function, those can eat a lot of resources and cause the kernel to become unhappy.