Code not running in C1_W2_Linear_Regression lab and cannot see output

For some reason it seems the code in the C1_W2_Linear_Regression lab is not being executed as there are no output results. See following screenshots.

Clicked run button:

Nothing happens:

I had even deliberately introduced syntax errors and it should show error message. It doesn’t even do that.

I didn’t have any problems with this before and was able to run all labs up to and including this lab. Then at some point during this lab it stopped working. I tried reloading the lab and restarting computer but same issue.

When I run code in another lab the code executes. See the following screenshot show error message.

Hello @JasonMak, welcome to our community!

image

The asterisk there indicates that the code is still being run. Do you have a loop in your compute_cost function? Would that loop be taking too much time to finish all iterations?

Raymond

Another thing that can slow down your code is if you have a lot of print() statements outputting information for debugging. That’s a very slow process because it requires sending many updates to your browser. That can make the kernel crash.

Maybe try restarting the kernel, there’s a menu item for that.

Thanks for the welcoming remark!

Yes I have a loop. I restarted the kernel as per TMosh’s suggestion and it executes the code now.

That did the trick! Thank you!