Print Email Facebook Twitter The Prevalence of Code Smells in Machine Learning Projects Title The Prevalence of Code Smells in Machine Learning Projects Author van Oort, B. (Student TU Delft) Cruz, Luis (TU Delft Software Engineering) Aniche, Maurício (TU Delft Software Engineering) van Deursen, A. (TU Delft Software Technology) Department Software Technology Date 2021 Abstract Artificial Intelligence (AI) and Machine Learning (ML) are pervasive in the current computer science landscape. Yet, there still exists a lack of software engineering experience and best practices in this field. One such best practice, static code analysis, can be used to find code smells, i.e., (potential) defects in the source code, refactoring opportunities, and violations of common coding standards. Our research set out to discover the most prevalent code smells in ML projects. We gathered a dataset of 74 open-source ML projects, installed their dependencies and ran Pylint on them. This resulted in a top 20 of all detected code smells, per category. Manual analysis of these smells mainly showed that code duplication is widespread and that the PEP8 convention for identifier naming style may not always be applicable to ML code due to its resemblance with mathematical notation. More interestingly, however, we found several major obstructions to the maintainability and reproducibility of ML projects, primarily related to the dependency management of Python projects. We also found that Pylint cannot reliably check for correct usage of imported dependencies, including prominent ML libraries such as PyTorch. Subject Artificial IntelligenceMachine LearningPythoncode smellsdependency managementstatic code analysis To reference this document use: http://resolver.tudelft.nl/uuid:712b8116-eec1-4c18-a596-82b0ad3a283b DOI https://doi.org/10.1109/WAIN52551.2021.00011 Embargo date 2022-01-19 Page numbers 35-42 Event WAIN'21 - 1st Workshop on AI Engineering – Software Engineering for AI, 2021-05-30 → 2021-05-31, Virtual, Madrid, Spain Bibliographical note Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project https://www.openaccess.nl/en/you-share-we-take-care Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public. Part of collection Institutional Repository Document type conference paper Rights © 2021 B. van Oort, Luis Cruz, Maurício Aniche, A. van Deursen Files PDF The_Prevalence_of_Code_Sm ... ojects.pdf 593.76 KB Close viewer /islandora/object/uuid:712b8116-eec1-4c18-a596-82b0ad3a283b/datastream/OBJ/view