feat: codecarbon monitor -- any_command#1004
Conversation
92e2d4b to
fff1c79
Compare
|
Ah sorry I was not at all aware of #431! Checking it now |
@benoit-cty it launches exactly what the user wants to launch, so I guess no need for a warning? If it is unsafe code it is unsafe with or without |
|
@copilot Please add a documentation in |
|
@benoit-cty I've opened a new pull request, #1045, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
I was about to merge this PR in the 3.2.2 release but with all my modification for sub-process it's more a 3.3. I think it's better to have sub-process monitor for this PR as it make sense to monitor only the program in parameter. What do you think ? |
|
Sounds good @benoit-cty , does this mean we can monitor now exactly the process and the other processes do not affect the measurement? |
Process monitoring works for RAM and CPU, not for GPU.
Yes, I'm OK with that proposition 👍 |
|
Sounds good, will take a look at it tmw |
00d28fe to
f9ccbfa
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1004 +/- ##
==========================================
+ Coverage 68.73% 69.75% +1.02%
==========================================
Files 41 42 +1
Lines 3873 3971 +98
==========================================
+ Hits 2662 2770 +108
+ Misses 1211 1201 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Add to the cli the ability to run codecarbon with any other tool.
Output in my console
Motivation and Context
Non-python users will be able to run their commands and measure the machine emissions while running those commands.
Basic Usage
The
--separator is required to separate CodeCarbon options from your command.Simple Examples
codecarbon run -- bash -c 'echo "Processing..."; sleep 3; echo "Done!"'codecarbon run -- bash -c 'for i in {1..1000}; do echo "scale=100; a(1)*4" | bc -l > /dev/null; done; echo "Calculation complete!"'Types of changes
What types of changes does your code introduce? Put an
xin all the boxes that apply:Checklist:
Go over all the following points, and put an
xin all the boxes that apply.