An LLM Approach to Fixing Common Code Issues in Machine Learning Projects
摘要
Modern empirical research in machine learning largely relies on developing custom software. Often such software is written by researchers and not professional software engineering. As a result, source code issues and the associated technical debt may accumulate and lead to higher programming effort, obstacles to code reuse, hidden software defects affecting the quality of the research itself. In this paper, we investigate if it is possible to apply automatic tools to prevent or remove these source code issues thus alleviating the need for software engineers in research projects. We analyze the source code of 24 open source research projects in machine learning, identify common issues and propose practical techniques to prevent these issues during coding. We also investigate if an application of an LLM coding assistant can fix common code issues automatically. We found out that 1) frequent source code issues largely the same for different machine learning frameworks 2) most of the issues could be eliminated by following simple coding practices 3) most of the issues could be removed by applying an LLM coding assistant.