Potential Grading or Unittest Evaluation issue in Building a Travel & Flight Optimization app C1-M3-Assignment

My first submission with all unittests passing received 73.68%. However, after I updated the changes according to the errors raised, I got 100% in submission, but some unittests fail.

Screenshot of 2nd submission with 100% grade received, which didn’t pass all the unittests:

Screenshot of 1st submission with 73.68% grade received, which passed all unittests:

As you can see, there is some disconnect between submissions grading process and unittests.

EDIT:
To help debug the problem. Here is what happens:

Case 1: When all unittests pass and I receive ~74% grade:
Unittests: No error notice. All Passed
Submission Grader: Gives a notice something similar to, “For the tour to be valid it should return to starting point.”

After I FIX the code so that it returns to the starting point, we get case 2

Case 2: Many unittests fail. BUT I receive 100% grade.
Unittests: Gives error notice similar to, “Invalid tour because tour has duplicate node”. But it has duplicate node because of the FIX i.e, it is returning to the starting point.
Submission Grader: No error notice. 100% grade

You passed the grader tests once and then not? The unittests in the lab walkthrough are not the same as the graders tests!

You are correct. The grader uses entirely different tests than those used in the notebook.

Yes, that is the pattern in all the courses, but it is a bit unusual to see a case in which you pass the grader, but fail the unit tests. The other way around is an everyday occurrence.

One other thing to look out for here is inconsistencies in the runtime state of the notebook. You can’t assume that clicking “Submit” to the grader will do a “Save” first. So it’s possible that you saved a working version of the notebook and then made a change locally that broke the unit tests and then clicked “Submit” without doing a “Save” first. So the grader is seeing a different version of the code than you are actually running.

If you want to make sure that WYSIWYG, try this sequence:

Kernel -> Restart and Clear Output
Cell -> Run All

Now look through and make sure all the unit tests pass. If they do, then do this:

Kernel -> Restart and Clear Output
Save
Submit

The real point there is the “Save”, but the other point is that the grader does not need to see your generated output and doing the “Clear” before “Submit” makes things as efficient as possible (minimizes the data sent to the grader).

Same situation. For some reason if you pass the tests, you won’t pass the grading process, and viceversa.

Sounds like we need some help from the course staff here. @lucas.coutinho are you able take a look or weigh in and let us know if this is a known problem? Thanks!

I passed it both times.

Weird thing is,

when I passed with ~74% grade. All unittests passed.
I fixed the source code then I passed with 100% grade, However, unittests returned error.

To help debug the problem. Here is what happens:

Case 1: When all unittests pass and I receive ~74% grade:
Unittests: No error notice. All Passed
Submission Grader: Gives a notice something similar to, “For the tour to be valid it should return to starting point.”

After I FIX the code so that it returns to the starting point, we get case 2

Case 2: Many unittests fail. BUT I receive 100% grade.
Unittests: Gives error notice similar to, “Invalid tour because tour has duplicate node”. But it has duplicate node because of the FIX i.e, it is returning to the starting point.
Submission Grader: No error notice. 100% grade

It is strange, lets see what the QA staff tagged here would make of this!

Is it possible that you have written the code in two different ways, to pass either set of tests, but you have not yet written code that will pass both sets of tests?

2 Likes

This can also be possible, quite right!

Apparently there was a change to the grader for this course two days ago. Others have reported there is a note in the assignment that regards changes on 1/15/2026.

Perhaps that’s also a factor here.

Hi all,

We indeed updated this assignment recently based on learner feedback. Despite our testing, some inconsistencies may still occur.

Could those of you experiencing problems send me your solutions via DM? I will review them to improve the grader and unit tests accordingly.

Cheers,
Lucas

1 Like