[Paper Review] Training and Evaluating a Jupyter Notebook Data Science Assistant
The paper trains JuPyT5 on public Jupyter notebooks and introduces DSP, an executable data-science problem benchmark, showing JuPyT5 solves up to 77.5% of DSP tasks with 100 attempts and analyzes training strategies, data composition, and evaluation against HumanEval/MBPP.
We study the feasibility of a Data Science assistant powered by a sequence-to-sequence transformer by training a new model JuPyT5 on all publicly available Jupyter Notebook GitHub repositories and developing a new metric: Data Science Problems (DSP). DSP is a collection of 1119 problems curated from 306 pedagogical notebooks with 92 dataset dependencies, natural language and Markdown problem descriptions, and assert-based unit tests. These notebooks were designed to test university students' mastery of various Python implementations of Math and Data Science, and we now leverage them to study the ability of JuPyT5 to understand and pass the tests. We analyze the content of DSP, validate its quality, and we find that given 100 sampling attempts JuPyT5 is able to solve 77.5\% of the DSP problems. We further present various ablation and statistical analyses and compare DSP to other recent natural language to code benchmarks.
Motivation & Objective
- Motivate the need for an educational, data-science–oriented code generation assistant evaluated on task-grounded problems.
- Create DSP, a large, executable benchmark of notebook-based data science problems with unit tests.
- Train JuPyT5 with a cell-infilling pretraining objective on diverse notebook data.
- Assess how training data composition and context size affect problem-solving performance.
- Compare DSP results to existing code-writing benchmarks (HumanEval/MBPP) and analyze limitations and deployment considerations.
Proposed method
- Train JuPyT5 (350M parameters) using a cell-infilling objective derived from Jupyter notebook cells.
- Use control tokens to distinguish between Markdown and code content and target types (e.g., <markdown>, <code>, <function>, <class>, <import>).
- Pretrain on a Markdown-focused subset vs. full dataset to study the impact of literate coding data.
- Evaluate with DSP by replacing the solution cell in each notebook problem and running unit tests; measure pass@k across multiple attempts.
- Compare JuPyT5 performance on DSP to HumanEval and MBPP using standard benchmarks.
- Analyze ablations and training choices (context cells C=1 vs C=3, cell infilling including a following grading cell) to determine contribution to success.
Experimental results
Research questions
- RQ1Can a data-science-oriented transformer effectively solve real problems embedded in Jupyter notebooks with unit tests?
- RQ2Does a cell-infilling pretraining objective improve problem-solving ability on DSP compared to baseline context modeling?
- RQ3How do data composition (Markdown-rich vs all notebooks) and look-ahead test visibility affect performance on DSP?
- RQ4How does JuPyT5's performance on DSP relate to established code benchmarks like HumanEval and MBPP?
- RQ5What deployment considerations arise when using a DSP-style evaluation in educational or business environments?
Key findings
- JuPyT5 solved 77.5% of DSP problems at 100 sampling attempts.
- Cell infilling with visibility of the subsequent grading cell yields large gains, achieving 67.9% pass@100 with C=1 and 77.5% pass@100 with C=3.
- Training on the Markdown-focused subset provides modest gains over full-data training.
- Context window (C=3 vs C=1) provides consistent improvements across k, with notable boosts when including the next cell (test visibility).
- JuPyT5 outperforms a much larger 68B parameter model on MBPP and approaches Codex performance on HumanEval when adapting docstrings to Markdown; however, Codex generally remains stronger on HumanEval, highlighting formatting sensitivity and data-domain effects.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.