Autograding Jupyter Notebooks tutorial webinar for computer science education
December 6, 2021

Webinar: Grading Jupyter Notebooks

In 30 seconds...

In this webinar we discussed:

  • What is a Jupyter Notebook?
  • Grading Jupyter Notebooks manually
  • Automatically running a Jupyter Notebook
  • How to format your Jupyter Notebook template for autograding?
  • Autograding Jupyter Notebooks with I/O Tests
  • Advanced Jupyter Notebook grading

Learn all about it in this article or watch the webinar here!

In our latest webinar, we tell you everything you need to know to get started with Jupyter Notebooks (also known as IPython Notebooks) in CodeGrade. We explain how Jupyter Notebooks are structured and how you can best manually grade and give feedback to them using CodeGrade's inline feedback, general feedback and render viewer. Furthermore, we teach you how you can effectively and easily autograde the Python code in Jupyter Notebooks. This webinar was part of our monthly CodeGrade Webinars series and was recorded live on December 3rd 2021, it is available on demand now.

Jupyter Notebook theory

Jupyter Notebooks, formerly known as IPython Notebooks, are files with the `.ipynb` extension. Even though Jupyter Notebooks support multiple programming languages, we most often see them used for Python courses. They combine these "code cells" with text cells (supporting Markdown and LaTeX). This combination makes for a very powerful educational tool that is used not only for courses like Introduction to Python, but also more advanced courses like Machine Learning, Data Science and Computer Vision.

On the inside, a Jupyter Notebook is simply a JSON document. All cells, metadata and output are stored in JSON. It is very important to understand that the output is also statically saved here and can thus be altered manually or be outdated if a Jupyter Notebook has not been run.

Manually Grading Jupyter Notebook

CodeGrade supports Jupyter Notebooks right out of the box and renders the notebook for you. You can then use all of CodeGrade's feedback features to give feedback and grade the Jupyter Notebook manually. You can give feedback on individual cells, lines of code and general feedback over the Jupyter Notebook as a whole.

Giving feedback to a text cell in CodeGrade: hover over the text cell and click the feedback button.

Automatically running Jupyter Notebooks for manual grading

As mentioned before: the output cells are also saved in the Jupyter Notebook JSON document. This means that when we are grading a Jupyter Notebook handed in by the student in CodeGrade, we are not guaranteed to have the latest version of the output (it can be manually altered by the student or the notebook could not be run). To solve this, we can use CodeGrade AutoTest to automatically run each IPython Notebook immediately after they are handed in. An up-to-date version of the Jupyter Notebook will then show up in the Code Viewer under the AutoTest output:

An automatically run Jupyter Notebook in CodeGrade's Code Viewer.

We can do this with a very simple command in a Run Program step in AutoTest. Add the following command (explained in more detail in the webinar):

-!- CODE language-sh -!- jupyter nbconvert --execute --to notebook 
-–output $AT_OUTPUT/jupyter.ipynb $STUDENT/jupyter.ipynb -–allow-errors

Start autograding your Jupyter Notebook assignments easily and effectively with CodeGrade!

Continue reading

Best Paid Autograders for University Programming Courses (2026)

A side-by-side comparison of the best paid autograders for university programming courses in 2026 — CodeGrade, Gradescope, Codio, and Vocareum — covering pricing, features, and LMS integration.

Best Autograders for University Programming Courses You Can Start Using for Free (2026)

A practical comparison of six free autograders for university programming courses in 2026 — including CodeGrade, GitHub Classroom, Gradescope, Autograder.io, Otter Grader, and nbgrader.

How to Grade Code Quality, Not Just Correctness

Learn how to automate code quality checks in CodeGrade using Flake8, Checkstyle, Semgrep, and clang-tidy — no manual review or custom YAML required.

Sign up to our newsletter