rayyan-ridwan/GreenGrad ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python tool called GreenGrad that helps me keep an eye on how much power and system resources my model training is using.

I want to be able to wrap a training loop, collect step by step snapshots for CPU, RAM, and GPU if it is available, then check simple rules like power limits or resource thresholds as the run goes. If the training goes over budget, it should raise clear violations and let me plug in a callback. After the run, I want a clean markdown report that shows what happened, what rules were broken, and gives a few practical recommendations.

Please also add a simple command line way to run quick training experiments and generate a report from saved results. Keep it lightweight, with no required extra dependencies if possible, and make the provider detection work nicely when system or GPU monitoring libraries are installed. Look up current docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab