Prevalence of Code Smells in Reinforcement Learning Projects
- URL: http://arxiv.org/abs/2303.10236v2
- Date: Thu, 3 Aug 2023 14:47:10 GMT
- Title: Prevalence of Code Smells in Reinforcement Learning Projects
- Authors: Nicol\'as Cardozo and Ivana Dusparic and Christian Cabrera
- Abstract summary: Reinforcement Learning (RL) is being increasingly used to learn and adapt application behavior in many domains, including large-scale and safety critical systems.
With the advent of plug-n-play RL libraries, its applicability has further increased, enabling integration of RL algorithms by users.
We note, however, that the majority of such code is not developed by RL engineers, which as a consequence, may lead to poor program quality yielding bugs, suboptimal performance, maintainability, and evolution problems for RL-based projects.
- Score: 1.7218973692320518
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: Reinforcement Learning (RL) is being increasingly used to learn and adapt
application behavior in many domains, including large-scale and safety critical
systems, as for example, autonomous driving. With the advent of plug-n-play RL
libraries, its applicability has further increased, enabling integration of RL
algorithms by users. We note, however, that the majority of such code is not
developed by RL engineers, which as a consequence, may lead to poor program
quality yielding bugs, suboptimal performance, maintainability, and evolution
problems for RL-based projects. In this paper we begin the exploration of this
hypothesis, specific to code utilizing RL, analyzing different projects found
in the wild, to assess their quality from a software engineering perspective.
Our study includes 24 popular RL-based Python projects, analyzed with standard
software engineering metrics. Our results, aligned with similar analyses for ML
code in general, show that popular and widely reused RL repositories contain
many code smells (3.95% of the code base on average), significantly affecting
the projects' maintainability. The most common code smells detected are long
method and long method chain, highlighting problems in the definition and
interaction of agents. Detected code smells suggest problems in responsibility
separation, and the appropriateness of current abstractions for the definition
of RL algorithms.
Related papers
- What's Wrong with Your Code Generated by Large Language Models? An Extensive Study [80.18342600996601]
Large language models (LLMs) produce code that is shorter yet more complicated as compared to canonical solutions.
We develop a taxonomy of bugs for incorrect codes that includes three categories and 12 sub-categories, and analyze the root cause for common bug types.
We propose a novel training-free iterative method that introduces self-critique, enabling LLMs to critique and correct their generated code based on bug types and compiler feedback.
arXiv Detail & Related papers (2024-07-08T17:27:17Z) - StepCoder: Improve Code Generation with Reinforcement Learning from
Compiler Feedback [58.20547418182074]
We introduce StepCoder, a novel framework for code generation, consisting of two main components.
CCCS addresses the exploration challenge by breaking the long sequences code generation task into a Curriculum of Code Completion Subtasks.
FGO only optimize the model by masking the unexecuted code segments to provide Fine-Grained Optimization.
Our method improves the ability to explore the output space and outperforms state-of-the-art approaches in corresponding benchmarks.
arXiv Detail & Related papers (2024-02-02T13:14:31Z) - Common Challenges of Deep Reinforcement Learning Applications Development: An Empirical Study [10.705440907493452]
Deep Reinforcement Learning (DRL) is a subdomain of Machine Learning (ML) used to produce intelligent agents.
Despite recent developments in DRL technology, the main challenges that developers face in the development of DRL applications are still unknown.
arXiv Detail & Related papers (2023-10-14T12:57:30Z) - A Survey of Meta-Reinforcement Learning [69.76165430793571]
We cast the development of better RL algorithms as a machine learning problem itself in a process called meta-RL.
We discuss how, at a high level, meta-RL research can be clustered based on the presence of a task distribution and the learning budget available for each individual task.
We conclude by presenting the open problems on the path to making meta-RL part of the standard toolbox for a deep RL practitioner.
arXiv Detail & Related papers (2023-01-19T12:01:41Z) - Automated Reinforcement Learning (AutoRL): A Survey and Open Problems [92.73407630874841]
Automated Reinforcement Learning (AutoRL) involves not only standard applications of AutoML but also includes additional challenges unique to RL.
We provide a common taxonomy, discuss each area in detail and pose open problems which would be of interest to researchers going forward.
arXiv Detail & Related papers (2022-01-11T12:41:43Z) - ShinRL: A Library for Evaluating RL Algorithms from Theoretical and
Practical Perspectives [11.675763847424786]
We present ShinRL, an open-source library for evaluation of reinforcement learning (RL) algorithms.
ShinRL provides an RL environment interface that can compute metrics for delving into the behaviors of RL algorithms.
We show how combining these two features of ShinRL makes it easier to analyze the behavior of deep Q learning.
arXiv Detail & Related papers (2021-12-08T05:34:46Z) - Towards Standardizing Reinforcement Learning Approaches for Stochastic
Production Scheduling [77.34726150561087]
reinforcement learning can be used to solve scheduling problems.
Existing studies rely on (sometimes) complex simulations for which the code is unavailable.
There is a vast array of RL designs to choose from.
standardization of model descriptions - both production setup and RL design - and validation scheme are a prerequisite.
arXiv Detail & Related papers (2021-04-16T16:07:10Z) - The Prevalence of Code Smells in Machine Learning projects [9.722159563454436]
static code analysis can be used to find potential defects in the source code, opportunities, and violations of common coding standards.
We gathered a dataset of 74 open-source Machine Learning projects, installed their dependencies and ran Pylint on them.
This resulted in a top 20 of all detected code smells, per category.
arXiv Detail & Related papers (2021-03-06T16:01:54Z) - OR-Gym: A Reinforcement Learning Library for Operations Research
Problems [0.0]
We introduce OR-Gym, an open-source library for developing reinforcement learning algorithms to address operations research problems.
In this paper, we apply reinforcement learning to the knapsack, multi-dimensional bin packing, multi-echelon supply chain, and multi-period asset allocation model problems.
arXiv Detail & Related papers (2020-08-14T12:21:22Z) - MushroomRL: Simplifying Reinforcement Learning Research [60.70556446270147]
MushroomRL is an open-source Python library developed to simplify the process of implementing and running Reinforcement Learning (RL) experiments.
Compared to other available libraries, MushroomRL has been created with the purpose of providing a comprehensive and flexible framework to minimize the effort in implementing and testing novel RL methodologies.
arXiv Detail & Related papers (2020-01-04T17:23:34Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.