mograder¶
Semi-automated grading for Marimo notebooks.
mograder aspires to become a Marimo equivalent of nbgrader. It doesn't yet have full feature parity but should already be useable. mograder has been developed based on experiences teaching computational modelling and machine learning with Jupyter and nbgrader in HetSys CDT and the Predictive Modelling and Scientific Computing MSc course, both at the University of Warwick.
Three grading modes¶
- Workshop mode — fully formative (no marks assigned). Model solutions can be unlocked automatically by students when they pass automated tests. Solutions can also be released one by one by an instructor from a web dashboard, allowing 'un-sticking' of students during a live workshop.
- Manual grading of a single holistic mark. Instant formative feedback is available to students on coding questions, while reflective interpretation is manually graded.
- Hybrid grading — automated per-question marks on coding exercises, plus a single mark for the reflective component.
Two transports are currently available: Moodle integration and HTTPS transport for standalone usage.
How it works¶
Instructors author source notebooks with solution blocks and automated checks. mograder generate strips solutions to create release versions. Students complete the notebooks and get instant formative feedback from check() calls. mograder autograde executes submissions in sandboxed subprocesses, parses results, and stores grades in an SQLite gradebook. Markers review and add manual marks via the grader dashboard. mograder feedback exports annotated HTML for students.
Try it¶
A live demo is available with three components:
- Student Dashboard — WASM app hosted on GitHub Pages. Lists assignments and links to self-hosted WASM notebooks for editing in the browser.
- Formgrader + Assignment Server — Combined ASGI app. The grader UI shows the full grading workflow (assignments, submissions, grading, students tabs) with pre-populated demo data. The same service also handles the assignment API at
/assignments. No login required (for a real server, token-based authentication should be used). - Notebook Editor — Click "Edit in Browser" in the dashboard to open a notebook as a standalone WASM app with full edit mode or "Edit in Molab" to open a full editor. Each notebook has a submit cell to send your work back to the demonstration assignment server.
There is also a Demo Workshop which is a WASM notebook demonstrating hints and encrypted solutions for formative workshops. The Instructor Dashboard controls which model solutions are visible to students. The workshop key for this demo is mograder.
A demonstration GitHub Codespaces shows how to open this repo in a Codespace for a full development environment with uv, marimo, and the student dashboard pre-configured.
Quick start¶
pip install mograder # or: uv add mograder
mograder generate hw1 # strip solutions → release/
mograder autograde hw1 # grade submissions → autograded/
mograder feedback hw1 # export HTML → feedback/
See the Installation page for full details, the Instructor Guide for a step-by-step walkthrough, or the Usage section for reference on each command.
For students¶
Easiest: download the desktop app — no terminal needed.
Or via the command line:
curl -LsSf https://astral.sh/uv/install.sh | sh
uvx mograder student https://mograder-demo.jrkermode.uk/mograder.toml
For real courses, your instructor will provide the config URL. Or open in GitHub Codespaces — one click, no install needed.