Closed inimaz closed 5 months ago
I am giving it a try here -->https://github.com/inimaz/vscode-extension-codecarbon. I will post here as soon as I have something working.
Evolution for now. Maybe a VSCode extension is too much overkill?
For now what I managed to do is a task in vscode that starts codecarbon
when you open vscode.
Create a file in your .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "codecarbon",
"type": "shell",
"isBackground": true,
"command": "${PATH_TO_YOUR_PYTHON_BIN}/codecarbon monitor --no-api",
"presentation": {
"close": false,
"panel": "dedicated",
"showReuseMessage": true
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
this will add an entry with your emissions to your emissions.csv
file every time you stop the terminal or close vscode.
First version early release is public and available to be installed ==> https://marketplace.visualstudio.com/items?itemName=CodeCarbon.codecarbon
Should we close this then @inimaz ?
Description
It would be great to have an extension in the VSCode IDE to start/stop measuring with a button/command.
There is a tutorial on how to implement this--> https://code.visualstudio.com/api/advanced-topics/python-extension-template