I’m getting a ‘test failed’ even though all of the previous exercises were all correct (‘All tests passed’). I reran the whole notebook, but it still outputs the same result.
When I try skipping to UNQ_10, it outputs a bunch of random words instead of the expected output.
Is there a problem with my code, or is it another issue? It’s really hard to diagnose the problem since there are so many moving parts and black boxes to consider.
It looks like you are working on an old version of the course which I only remember vaguely and do not have current access to.
Still, from what I see your code for UNQ_C9 looks correct, so the cause may lie with previous exercises. Not everything that could cause an issue is tested by the public tests, so ‘all tests passed’ does not necessarily mean everything is correct.
So I would suggest going through the previous exercises to see if you can spot an error there.
I went through your code and could not find anything wrong. Unfortunately I cannot test your code as I do not have access to the version of the course you are taking.
One thing you could try is to start from a new clean notebook, copy your code in, and see if it passes the tests. This would take care of unintended changes in the code provided in the notebook. To get a clean notebook, follow these suggestions:
Otherwise, I simply would not know. It could have something to do with changes to the stored model parameters. You can in any case submit the notebook and see if you get a high enough score to pass.