Notebook crashing word embedding assignment

Hi,
I finished the assignment on word_to_vec embeddings, all test past and when I submitted the grader gave me 0/100 with an error message.
Cell #5. Can’t compile the student’s code. Error: TypeError("‘int’ object is not subscriptable",)
Now I can’t open the notebook. It loads, uses all the memory of the browser and crash the browser after the first 2 seconds open (unresponsive) with an out of memory. :frowning:

Can you help me?

Thxs

@TMosh, @Kic do you know what to do or who may know?

In order to get around the memory error, you need to click “Kernel → Restart and Clear Output”, but the problem is you can’t do that until you can get the notebook to run. One thing to try would be to reboot your computer and just fire up the browser without starting a lot of other apps. That way you’ll have the best chance of being able to get enough Virtual Memory to start the notebook. The problem is that when you run the training, the memory footprint of the notebook can get pretty large.

As to the actual error from the grader, I have not done this assignment yet. But my guess is that the grader is passing different parameters that cause a different path through your code and it’s hitting a bug in your code. You just happened to get lucky (or unlucky depending on your p.o.v.) and the test cases in the notebook don’t trigger the bug.

2 Likes

Hi @Edu4rd ,

The units tests are there to provide some confidence of your code, they are not designed to test your code fully. So, there must be some problem that the auto grader picked up and threw an error.
When you manage to get your machine working normally, do send me your notebook via a DM, I will have a look for you.

1 Like

Hi,
thank you. It worked. I moved from my Windows + Chrome to my Mac + Safari and I was able to restart and clear output.
Then I deleted a an extra cell I created to play word embeddings as suggested and submitted again.
100/100 now.

Thxs!

Same issue on my end. Please fix this on the code as anyone wanting to play with the embeddings is going to encounter the same problem.

My understanding of the previous contents of this thread is that the problem was caused by faulty user code that was added by Edu4rd. So who is the “you” that you are implicitly expecting to fix this on your behalf?