Messy Code Makes Managing ML Pipelines Difficult? Just Let LLMs Rewrite the Code!
Sebastian Schelter, Stefan Grafberger

TL;DR
This paper proposes using large language models to automatically rewrite messy data science code into clean, declarative ML pipelines, addressing the gap between real-world code and the abstractions needed for better management and compliance.
Contribution
It introduces a novel approach leveraging LLMs to transform imperatively written data science code into declarative pipelines, facilitating better pipeline management without changing existing development practices.
Findings
LLMs can identify and convert hand-coded joins into dataframe joins.
LLMs can generate declarative feature encoders from NumPy code.
The prototype Lester demonstrates effective code rewriting for compliance tasks.
Abstract
Machine learning (ML) applications that learn from data are increasingly used to automate impactful decisions. Unfortunately, these applications often fall short of adequately managing critical data and complying with upcoming regulations. A technical reason for the persistence of these issues is that the data pipelines in common ML libraries and cloud services lack fundamental declarative, data-centric abstractions. Recent research has shown how such abstractions enable techniques like provenance tracking and automatic inspection to help manage ML pipelines. Unfortunately, these approaches lack adoption in the real world because they require clean ML pipeline code written with declarative APIs, instead of the messy imperative Python code that data scientists typically write for data preparation. We argue that it is unrealistic to expect data scientists to change their established…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDigital Rights Management and Security
