GreenCodeAnalyzer: Detecting Energy Code Smells in Data Science with Static Analysis
Marina Escribano Esteban, Kevin Hoxha, Inaesh Joshi, Todor Mladenovic.
Group 1.

As data science workloads continue to grow in complexity and scale, energy efficiency has become a critical concern. Code inefficiencies not only inflate computational costs but also exacerbate environmental impacts. While existing tools profile and measure energy consumption of code at runtime or statically analyze energy code smells, few solutions specifically target data science workflows. GreenCodeAnalyzer fills this gap by identifying energy code smells in widely used Python libraries such as Pandas, NumPy, TensorFlow, PyTorch, and SciKit-Learn. Implemented as a Visual Studio Code extension, it scans Python files for inefficiencies like redundant model training or suboptimal data loading, then offers optimization suggestions to promote more sustainable and cost-effective software development.