mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1.18k stars 178 forks source link

Monitor subprocess #431

Open jennydaman opened 1 year ago

jennydaman commented 1 year ago

Resolves https://github.com/mlco2/codecarbon/issues/382

This PR adds functionality to the codecarbon monitor command.

When you run codecarbon monitor, the previous behavior is kept the same.

When you run codecarbon monitor -- some positional --arguments -lah, the positional arguments are ran as a subprocess and monitored with the option tracking_mode="process".

SaboniAmine commented 6 months ago

@benoit-cty besides documentation, is there any other blocker on this PR ?

benoit-cty commented 6 months ago

@benoit-cty besides documentation, is there any other blocker on this PR ?

It has to be tested to ensure it works as expected.

itamarst commented 1 week ago

Was just looking for this feature! Hope it can get merged eventually.