Although My code is giving me correct result during running the notebook.
But when I submit the result I got this:
Code Cell UNQ_C1: Function 'clip' is correct.
Code Cell UNQ_C2: Function 'sample' is correct.
Code Cell UNQ_C3: Unexpected error (KeyError('da_next')) occurred during function check. We expected function `optimize` to return Test 3 failed. Please check that this function is defined properly.
Code Cell UNQ_C4: Function 'model' is correct.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
The problem is your code doesn’t work correctly when the grader tests it with a different set of data.
Most often this problem is due to your code in the notebook using a global variable that isn’t supported by the grader.
The error suggests you’re using the variable ‘da_next’ incorrectly.
Sorry, but we don’t support debugging the assignment whne you run it in your local machine. We can only help with your results using Coursera Labs via your browser.
Thank you. I just created a new notebook and copied the solution here. Now its working.I think in the previous notebook I had created some new cells and forgot something to remove. Anyway, its working now.
One thing I want to ask you that, the notebook giving me right result on the Coursera lab, so in my local machine. only the model function giving me a different result for the same notebook as I showed before. I assume its because of the random function ( as the function is correct only it gives a different result). Is that so? I don’t need any answer. I just wanted to know you thoughts. Anyway, thank you once again.
Hi TMosh:
I also get the message: Code Cell UNQ_C3: Unexpected error (KeyError(‘da_next’)) occurred during function check. We expected function optimize to return Test 3 failed. Please check that this function is defined properly. for Week 1 assignment 2.
But I do not have any da_next variables… And I run from scratch my notebook and pass all the tests but grader fails my UNQ_C3 test. Can you give a hint how to debug? Thank you