[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-290356-105":59,"doc-detail-290356-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","suggesting-code-edits-in-interactive-machine-learning-notebooks-using-large-language-models","Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models","","Machine learning developers rely on interactive computational notebooks, such as Jupyter notebooks, to run data processing and train models, but maintaining them through new features and bug fixes is difficult due to length and complexity. The work introduces a first dataset containing 48,398 Jupyter notebook edits from 20,095 GitHub revisions across 792 repositories, capturing cell-level and line-level changes with commit context. Experiments with LLMs show localized edits yet low editing accuracy across model sizes, even after fine-tuning, highlighting the need for contextual information to improve real-world code maintenance.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/suggesting-code-edits-in-interactive-machine-learning-notebooks-using-large-language-models/290356/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/suggesting-code-edits-in-interactive-machine-learning-notebooks-using-large-language-models/290356.png","ImageObject",300,407,{"name":92,"@type":93},"Eliana","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-29","2026-09-17",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",13,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does the work address for Jupyter notebook maintenance?","Question",{"text":113,"@type":114},"Maintaining Jupyter notebooks through frequent, fragmented edits is challenging, and there was no existing benchmark specifically for developer code edits on Jupyter notebooks.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"What does the proposed dataset contain?",{"text":118,"@type":114},"It includes 48,398 Jupyter notebook edits derived from 20,095 revisions across 792 machine learning repositories on GitHub, with detailed cell-level and line-level modifications plus commit metadata.",{"name":120,"@type":111,"acceptedAnswer":121},"How do large language models perform on predicting these code edits?",{"text":122,"@type":114},"Edits are highly localized, but all models show low accuracy on the dataset even after fine-tuning, indicating the task’s real-world complexity and the importance of contextual information.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},290356,1789641465,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":24,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":130,"read_time":105,"preview_page_count":4},4398048949847,"https://ap-avatar.wpscdn.com/avatar/400002536579ef2da7f?_k=1778318612642679267","Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models  \nBihui Jin*  \nUniversity of Waterloo Waterloo, Canada [bihui.jin@uwaterloo.ca](bihui.jin@uwaterloo.ca)  \nJiayue Wang*  \nUniversity of Waterloo Waterloo, Canada [jiayue.wang@uwaterloo.ca](jiayue.wang@uwaterloo.ca)  \nPengyu Nie  \nUniversity of Waterloo Waterloo, Canada [pynie@uwaterloo.ca](pynie@uwaterloo.ca)  \narXiv :2501 .09745v 1 [ cs . SE] 16 Jan 2025  \nAbstract—Machine learning developers frequently use interactive computational notebooks, such as Jupyter notebooks, to host code for data processing and model training. Jupyter notebooks provide a convenient tool for writing machine learning pipelines and interactively observing outputs, however, maintaining Jupyter notebooks, e.g., to add new features or fix bugs, can be challenging due to the length and complexity of the notebooks. Moreover, there is no existing benchmark related to developer edits on Jupyter notebooks. To address this, we present the first dataset of 48,398 Jupyter notebook edits derived from 20,095 revisions of 792 machine learning repositories on GitHub, and perform the first study of the using LLMs to predict code edits in Jupyter notebooks. Our dataset captures granular details of cell-level and line-level modifications, offering a foundation for understanding real-world maintenance patterns in machine learning workflows. We observed that the edits on Jupyter notebooks are highly localized, with changes averaging only 166 lines of code in repositories. While larger models outperform smaller counterparts in code editing, all models have low accuracy on our dataset even after finetuning, demonstrating the complexity of real-world machine learning maintenance tasks. Our findings emphasize the critical role of contextual information in improving model performance and point toward promising avenues for advancing large language models’ capabilities in engineering machine learning code.  \nI. INTRODUCTION  \nThe widespread adoption of Jupyter notebooks as a development platform in machine learning (ML) has led to its significant role in the iterative processes of coding, debugging, and model training [1], [5], [6] . Jupyter notebooks [11] are ubiquitous among data scientists and ML developers, serving as synergistic environments for software development [22], data process [26], software evaluation [17], and software maintenance [3], [30] . Despite utility, maintaining Jupyter notebooks presents significant challenges, such as frequent and fragmented edits, especially as the notebooks grow in size and complexity [27] .  \nThe field of software development has been significantly transformed by advancements of large language models (LLMs) [9], [16], [18], [23], offering an alternative for practitioners to efficiently manage repetitive and time-consuming code edits [12] . As Jupyter notebooks usually contain domainspecific code on a specific topic, such as machine learning,  \n*  \nThese authors contributed equally to this work.  \ndata-driven approaches like LLMs are also ideal solutions for managing the code edits on them.  \nExisting work and datasets on Jupyter notebooks [2], [7],[20],[25],[28] focuses exclusively on code generation or comprehension tasks, limiting their relevance for understanding and automating the code maintanance tasks. In addition, they are usually constrained to specific domains (e.g., focusing onspeicifc libraries such as pandas and pytorch) and limited in scale. Therefore, there is a need for a benchmark with realistic ML intents and rich notebook context, so as to better reflect real-world code edits made by ML developers.  \nTo bridge the gap, we propose a dataset with 48,398 Jupyter notebook edits, derived from 20,095 revisions across 792 machine learning repositories on GitHub. We curate a repository dataset with unprecedented granularity, capturing both celllevel and file-level changes alongside associated metadata like commit messages. Notably, ","cbCaib6zr0ESF5uf","https://ap.wps.com/l/cbCaib6zr0ESF5uf","pdf",222747,"English","# Introduction\n## Motivation and gap in existing work\n## Dataset construction and granularity\n## LLM application and findings","[{\"question\":\"What problem does the work address for Jupyter notebook maintenance?\",\"answer\":\"Maintaining Jupyter notebooks through frequent, fragmented edits is challenging, and there was no existing benchmark specifically for developer code edits on Jupyter notebooks.\"},{\"question\":\"What does the proposed dataset contain?\",\"answer\":\"It includes 48,398 Jupyter notebook edits derived from 20,095 revisions across 792 machine learning repositories on GitHub, with detailed cell-level and line-level modifications plus commit metadata.\"},{\"question\":\"How do large language models perform on predicting these code edits?\",\"answer\":\"Edits are highly localized, but all models show low accuracy on the dataset even after fine-tuning, indicating the task’s real-world complexity and the importance of contextual information.\"}]","Suggesting Code Edits in Interactive Machine Learning Notebooks Using Large Language Models | PDF"]