Dear team,
I have a result of 0/80, despite the fact that I passed all tests. Why?
My lab id is tcnhtndb.
I HAVE TO DECIDE IF CONTINUING PAYING THE COURSE OR STOP IT. I have to decide very soon.
Thanks in advance,
Giansalvo Cirrincione
I have taken a look at your notebook.
At the start of the assignment thereâs a note, Important Note on Submission to the AutoGrader
, and couple of points in there are to (1) not change the function parameters and (2) to not change any of the given code. You have violated both of these in Ex 4
This is the original code:
This is from your notebook:
As you can see, you changed the function parameters from lines
and eval_lines
to lines=lines
and eval_lines=eval_lines
, by doing this, you are passing the assignment tests because all of these variables are present in the notebook, but you have disrupted the autograder test which uses different values for these parameters.
Moreover, you removed the import from trax.supervised import training
and changed the code in places where this import was being used, for example, you changed training.TrainTask(...)
to trax.supervised.training.TrainTask(...)
.
Youâll see that when youâll revert back the changes you have made in the code cell, youâll be able to pass the grader. In case you are unsure of where the changes you have made, Iâd recommend to fetch a fresh copy of the notebook.
Regards,
Mubsi
Hi,
I have done your changes, but it does not work yet. In the exercise 4, I have the error:
File ââ, line 5
def train_model(model, data_generator, batch_size=32, max_length=64, lines, eval_lines, n_steps=1, output_dir=âmodel/â):
^
SyntaxError: non-default argument follows default argument
The final grade is still 0. Why?
Thanks in advance,
Giansalvo
ID: tcnhtndb
Iâd recommend you get a get a fresh copy of the notebook and try again. And instead of copy/pasting your solutions, type them again.
If that doesnât work, let me know.
Thanks,
Mubsi
Done, but, unfortunately, same error message.
What else to do?
Thanks,
Giansalvo
I shall take a look @Giansalvo_Cirrincion.
If you had followed my instructions, this would have been solved.
This is the original function definition of Ex 4
:
def train_model(model, data_generator, lines, eval_lines, batch_size=32, max_length=64, n_steps=1, output_dir=âmodel/â):
And this is from your notebook:
def train_model(model, data_generator, batch_size=32, max_length=64, lines, eval_lines, n_steps=1, output_dir=âmodel/â):
Do you notice the difference ? You have passed the parameters lines
and eval_lines
after passing a default
parameter value (batch_size=32
). Python does not allow this, which is why you are getting the syntax error SyntaxError: non-default argument follows default argument
.
To learn more about this syntax error you can read this.
Revert back to the original function definition and youâll see that itâll run.
Happy learning,
Mubsi
Thank you very much for your competence, help and kindness. Now it works.
Best regards,
Giansalvo Cirrincione