Beyond Accuracy: An Empirical Study on Unit Testing in Open-source Deep Learning Projects

Author:

Wang Han1,Yu Sijia2,Chen Chunyang1,Turhan Burak3,Zhu Xiaodong2

Affiliation:

1. Faculty of Information Technology, Monash University, Australia

2. Jilin University, Changchun, China

3. M3S Research Unit, Faculty of ITEE, University of Oulu, Finland

Abstract

Deep Learning (DL) models have rapidly advanced, focusing on achieving high performance through testing model accuracy and robustness. However, it is unclear whether DL projects, as software systems, are tested thoroughly or functionally correct when there is a need to treat and test them like other software systems. Therefore, we empirically study the unit tests in open-source DL projects, analyzing 9,129 projects from GitHub. We find that: 1) unit tested DL projects have positive correlation with the open-source project metrics and have a higher acceptance rate of pull requests, 2) 68% of the sampled DL projects are not unit tested at all, 3) the layer and utilities (utils) of DL models have the most unit tests. Based on these findings and previous research outcomes, we built a mapping taxonomy between unit tests and faults in DL projects. We discuss the implications of our findings for developers and researchers and highlight the need for unit testing in open-source DL projects to ensure their reliability and stability. The study contributes to this community by raising awareness of the importance of unit testing in DL projects and encouraging further research in this area.

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference81 articles.

1. 2015. pytest: helps you write better programs. https://docs.pytest.org/en/7.1.x/. Accessed: 2022-08-21. 2015. pytest: helps you write better programs. https://docs.pytest.org/en/7.1.x/. Accessed: 2022-08-21.

2. 2016. Unit tests for functions in a Jupyter notebook?https://stackoverflow.com/questions/40172281/unit-tests-for-functions-in-a-jupyter-notebook. Accessed: 2022-08-16. 2016. Unit tests for functions in a Jupyter notebook?https://stackoverflow.com/questions/40172281/unit-tests-for-functions-in-a-jupyter-notebook. Accessed: 2022-08-16.

3. 2017. How To Unit Test Machine Learning Code. https://www.kdnuggets.com/2017/11/unit-test-machine-learning-code.html. Accessed: 2022-03-09. 2017. How To Unit Test Machine Learning Code. https://www.kdnuggets.com/2017/11/unit-test-machine-learning-code.html. Accessed: 2022-03-09.

4. 2017. Tensorflow response is making no sense. https://www.reddit.com/r/MachineLearning/comments/6qyvvg/p_tensorflow_response_is_making_no_sense/. Accessed: 2022-08-09. 2017. Tensorflow response is making no sense. https://www.reddit.com/r/MachineLearning/comments/6qyvvg/p_tensorflow_response_is_making_no_sense/. Accessed: 2022-08-09.

5. 2021. driver-check.py. https://github.com/5gon12eder/msc-graphstudy/blob/master/test/driver-check.py. Accessed: 2022-01-09. 2021. driver-check.py. https://github.com/5gon12eder/msc-graphstudy/blob/master/test/driver-check.py. Accessed: 2022-01-09.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3