C4W1_Assignment: run error, grader error

Hello!
I did experiments with my assignment in Colab, and typed ready solutions in Coursera notebook
So as I’m almost sure that have not changed any lines in Coursera notebook.
4 first test passed
Аt 3. Training run falls at 5 epochs
Grader error
“There was a problem compiling the code from your notebook. Details:
invalid syntax (, line 497)”
Please help me to find this problem


1 Like

When you put a Coursera notebook into Colab, then take it back to Coursera, you’re extremely likely to have the notebook contents mangled in unexpected ways.

1 Like

Hi @Maria_Petrovskaya

Passing unit tests does not guarantee that you would pass the grading. For example, you might have on of your created cells which has a syntax error - it is not a problem for unit test, since it does not use that cell, but the grader checks all the cells in your notebook.

Another point of failure can easily be the code itself - your loss is too high and accuracy is too low for the epoch 5 of this exercise.

Cheers

2 Likes

Also, when the Coursera grader is unhappy, it tends to throw very confusing error messages. So it’s difficult to sort out the problems without doing a file comparison between your notebook and the reference solution.

Unfortunately, I can’t do this for you, because I am not a mentor for this course, and I don’t have access to the materials.

2 Likes

Im am sure that my colab version will not fit Coursera grader - I add I lot or “pip install” “print” ets. lines…

1 Like

Ноw to find [quote=“Maria_Petrovskaya, post:1, topic:541323”]
(, line 497)” in Coursera notebook?
[/quote] ? I only know how to add line numbers in separate cells

1 Like

This is the line of your raw notebook - which in your case is the test for the Encoder.

2 Likes

Sorry, I do not know how the grader counts lines. It’s a mystery.

1 Like

Hi @TMosh

The way I understand it, the grader counts the lines of the raw notebook:

As I understand it, in my case, the error message would have been that I have the error on the 498 line.

Does that makes sense?

3 Likes

This Line in comment as problem for every task

1 Like

The way I understand it, the grader cannot go pass that line because of the syntax error and it is the reason(the same line of code) for other tasks too.

2 Likes

Thank you! So what can I do in this case???

1 Like

:slight_smile: my guess would be try to get the correct solution for the Exercise 1 (the Encoder class) which is pretty basic and you don’t need to overthink much.

2 Likes

What may be wrong? (I have not any idea…)

1 Like

Did you receive my private message?

2 Likes

i got the same error even after passing the test in notebook, dont know what to do

@Hardik_Kandpal, which “same error” are you referring to? Please be specific. A screen capture image would help.


test cases are being accepted in notebook but not graded

Thanks for posting the image.
A mentor for his course will find the information helpful.

One more bit of info, click on any of the > markers, and that will open the detailed grader feedback. Please post screen captures of those also.

thanks for support
Screenshot 2024-01-18 125424