NB2P: Generating Data Science Pipelines from Computational Notebooks
Haotian Gao, Quang Trung Ta, Tien Tuan Anh Dinh, Nhut-Minh Ho, Zhiyong Huang, Beng Chin Ooi
Abstract
Computational notebooks empower data scientists to explore data, perform analytics, and share findings through data pipelines. Extracting these pipelines facilitates understanding and migrating them to production systems. However, notebook cells executed in arbitrary order complicate data flow between stages. Moreover, data operations may not be cleanly separated, hindering the extraction of cohesive pipeline components. In this paper, we propose NB2P, a novel system that automatically extracts data science pipelines from notebooks. Given a notebook, NB2P performs analysis at the syntax tree level to recover the execution order, then groups the data operations into pipeline stages based on semantics. It uses a tree-based, learned encoding-decoding algorithm that captures the data flow and fine-grained hierarchical information in the notebook. Finally, NB2P assembles the stages and constructs the final pipeline that can be deployed into production systems. We train NB2P on a large notebook corpus from Kaggle and compare it against baselines that use state-of-the-art large language models and other approaches. The experimental results show that NB2P consistently outperforms the baselines while incurring low overhead.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 5837fcdf-c3f5-45e2-905a-200dec3729cdRelated papers
- Cell2Doc: ML Pipeline for Generating Documentation in Computational NotebooksTamal Mondal, Scott Barnett, Akash Lal, Jyothi VeduradaASE 2023 · 4 citations
- NBSearch: Semantic Search and Visual Exploration of Computational NotebooksXingjun Li, Yuanxin Wang, Hong Wang, Yang Wang et al.CHI 2021 · 22 citations
- Telling Stories from Computational Notebooks: AI-Assisted Presentation Slides Creation for Presenting Data Science WorkChengbo Zheng, Dakuo Wang, April Yi Wang, Xiaojuan MaCHI 2022 · 53 citations
- Slide4N: Creating Presentation Slides from Computational Notebooks with Human-AI CollaborationFengjie Wang, Xuye Liu, Oujing Liu, Ali Neshati et al.CHI 2023 · 37 citations
- Code Code Evolution: Understanding How People Change Data Science Notebooks Over TimeDeepthi Raghunandan, Aayushi Roy, Shenzhi Shi, Niklas Elmqvist et al.CHI 2023 · 19 citations
