C2W2_Assignment: Exercise return None Type in grading but look fine interactively

When I run my notebook I get the expected data for Exercise 2 to 5, but the grading does not accept my code and says from Exercise 2 onward:

Failed test case: get_records has incorrect type.
but got:
<class 'NoneType'>.

Same for the next step and all following steps:

Failed test case: statistics_gen has incorrect type.
<class 'tfx.components.statistics_gen.component.StatisticsGen'>,
but got:
<class 'NoneType'>.

Any hint how to fix my bug that seems only to occur when I submit my code but is not visible to me in my interactive notebook runs? Will thankfully appreciate any help with this.

Have you perhaps renamed your notebook?

Hello @TMosh thanks for the quick reply. No I am not aware of having renamed the notebook. It’s name is : C2W2_Assignment.ipynb. I think that is the original name.

I’m not a mentor for this course, but in general the most common issues are:

  • Renaming the notebook. The grader always uses the original notebook file name, regardless of what notebook you have open.
  • Attempting to grade an incomplete notebook. Generally you should complete the entire notebook before running the grader.

Odds are good that grader metadata is missing in your notebook. Please refresh your workspace if required.

If that’s not the case, click my name and message your notebook as an attachment.

Thanks a lot I figured out my issue: I had accidentally left the # grade-up-to-here comment in the notebook. When I removed that comment the grading worked. Thanks a lot for your help with this.

I am having the same problem, I reverted the notebook version. The # grade-up-to-here is not present. The notebook name is unchanged. and the grader-required-cell are present.

My notebook is here:
[snippet removed by mentor]

Please advise.
Thank you

Posting code in a public topic is discouraged and can get your account suspended. It’s okay to share stacktrace on a public post and send code to a mentor via direct message. Please clean up the post.

I just tried your notebook from this thread and the grader gave me the full score. Please submit your notebook again without renaming it from C2W2_Assignment.ipynb

If that doesn’t work, do share the expanded screenshot of grader feedback.

Thank you. I tried submitting again, and the grading was successful. Not sure what the difference was.

Thank you for your help and apologies for posting the notebook.

You’re welcome. Glad to know things worked.