Hello. I need help with Assignment 1, Exercise 5: log_perplexity. I’m able to pass all the tests for that function correctly. However, when I submit my assignment, I get 0 points for log_perplexity and I see the following message below the grade of log_perplexity: "There was an error grading your submission. Details:
operands could not be broadcast together with shapes (2,7) (2,) ". Please see screenshot.
Can someone please help me with this? I think the error is coming in the code line after “# Apply non-padding mask to log probabilities to exclude padding”. Thanks!
Hi @Deepti_Prasad , thanks for your answer! I was about to send you a screenshot of my code when I realized something weird. Though yesterday I saw I was getting 0 points for log_perplexity, giving me a grade of 80%, when I now see my assignment, it says I got a grade of 100%. I’ll send you my code in private message nonetheless.
I’m not a mentor for this course, but this kind of change can be due to the state of your notebook being different than you think. For example if you make a change to your code, run the local test and it now works. But then you hit “Submit” without first clicking “Save” and it’s possible the grader is still seeing the previous version of your code without your most recent change. In some of the courses hitting “Submit” seems to do an autosave, but not in all of them. You could try some scientific experiments to confirm or deny this theory in this course.
Hi @paulinpaloalto! Thank you. As far as I remember, I did click on Save before clicking on Submit. However, I’ll take this into account in the future. Many thanks!
I checked your codes for log_perplexity which is completely correct, what I could guess here for your submission to fail before could be related to a recent bug issue reported for this assignment which I guess when you reopened must have got updated. Otherwise, it could also be related kernel being disconnect and probably one of the cell didn’t run down before you submitted the first time as you reopening and submit cleared your assignment submission.
Thank you very much for checking my code, @Deepti_Prasad! I really appreciate it. Thanks also for the possible explanations regarding why I was not passing the grader.
Just to be more sure, I am tagging L.T of this course so if any bug issue still exist can be looked upon for this issue or to know what really could be issue for the error to resolve on its own.
@lucas.coutinho can you check with this post, learner had a value error of mismatch input shape which resolved on reopening and submitting. does the metadata still need to be checked upon?
This is actually weird. We indeed recently changed some parts of this function and updated the autograder accordingly. I’m not sure what may have happened as you didn’t change anything and later it worked. My guess is that for some reason the autograder version in your environment wasn’t updated, but I have never seen this happening.
Let’s monitor for now as the issue is resolved. @goldfish, please share with us your grading output.
let me know if your issue still persists, you can share with me also codes as L.T sometimes are busy because of their numerous responsibility. You also haven’t confirmed if resubmitting solved your issue or not. Also you didn’t share any screenshot of the error here in the post. @goldfish