-
-
Notifications
You must be signed in to change notification settings - Fork 243
feat: codecarbon run -- any_command #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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 |
SaboniAmine
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Inigo!
|
@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? |
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.