NLP C1_W3_Assignment grading issue

Assignment: Vector Space Models

All the tests are passed while submitting the notebook , but grade is failed.
grader output is: “There was a problem grading your submission. Check stderr for more details.”
I don’t understand what I am doing wrong. Everything is correct as per me

Hi @vidisha89

Issues with your codes

For UNQ_C3 GRADED FUNCTION: get_country
def get_country
For codes lines where you needed to use embedding (check the input argument which is already defined as embeddings: a dictionary where the keys are words and values are their emmbeddings) but you have used word_embedding is creating the failure of grades.

I am sharing the codes lines where you have used word_embedding in your codes

  1. get embeddings of city 1
  2. get embedding of country 1
  3. get embedding of city 2
  4. Also in the loop through all words in the embeddings dictionary, where you have to get the word embedding, you again used word_embedding which is incorrect, change to the correct assigned argument for all the four code lines.

Once you do correction for UNQ3 grade cell codes, your UNQ4 grade cell gets corrected as you use the same recalled function from UNQ3 get_country to write code line in UNQ4 grade cell for code line
use get_country to find the predicted country2

Let me know once you resolve the issue.

Regards
DP

issue resolved.
Thank you for your prompt assistance and time.

1 Like