MLSmellHound:一个上下文感知的代码分析工具
MLSmellHound: A Context-Aware Code Analysis Tool
摘要:
为了满足将机器学习(ML)组件整合到软件系统中的行业需求,需要跨学科团队为共享代码库做出贡献。为了保持一致性,减少缺陷并确保可维护性,开发人员使用代码分析工具来帮助他们识别缺陷并维护标准。随着机器学习的引入,工具必须考虑团队内部的文化差异,这些差异表现为多种程序设计语言以及相互冲突的定义和目标。现有的工具无法识别这些文化差异,并且面向软件工程,这减少了它们在ML项目中的采用。在我们的方法中,我们试图通过探索上下文的使用来解决这个问题,其中包括i)源代码的目的,ii)技术领域,iii)问题领域,iv)团队规范,v)操作环境,以及vi)开发生命周期阶段,为代码分析提供上下文化的错误报告。为了演示我们的方法,我们以Pylint为例,并根据分析中的各个项目文件的域将一组上下文转换应用于linting结果。这允许为最终用户提供上下文化和有意义的错误报告。
英文摘要:
Meeting the rise of industry demand to incorporate machine learning (ML) components into software systems requires interdisciplinary teams contributing to a shared code base. To maintain consistency, reduce defects and ensure maintainability, developers use code analysis tools to aid them in identifying defects and maintaining standards. With the inclusion of machine learning, tools must account for the cultural differences within the teams which manifests as multiple programming languages, and conflicting definitions and objectives. Existing tools fail to identify these cultural differences and are geared towards software engineering which reduces their adoption in ML projects. In our approach we attempt to resolve this problem by exploring the use of context which includes i) purpose of the source code, ii) technical domain, iii) problem domain, iv) team norms, v) operational environment, and vi) development lifecycle stage to provide contextualised error reporting for code analysis. To demonstrate our approach, we adapt Pylint as an example and apply a set of contextual transformations to the linting results based on the domain of individual project files under analysis. This allows for contextualised and meaningful error reporting for the end-user.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。