You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_sources/usage.rst.txt
+61-1Lines changed: 61 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,67 @@ The command line could also works without internet by providing the country code
66
66
67
67
codecarbon monitor --offline --country-iso-code FRA
68
68
69
-
Implementing CodeCarbon in your code allows you to track the emissions of a specific block of code.
69
+
70
+
Running Any Command with CodeCarbon
71
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72
+
73
+
If you want to track emissions while running any command or program (not just Python scripts), you can use the ``codecarbon monitor --`` command.
74
+
This allows non-Python users to measure machine emissions during the execution of any command:
75
+
76
+
.. code-block:: console
77
+
78
+
codecarbon monitor -- <your_command>
79
+
80
+
Do not surround ``<your_command>`` with quotes. The double hyphen ``--`` indicates the end of CodeCarbon options and the beginning of the command to run.
81
+
82
+
**Examples:**
83
+
84
+
.. code-block:: console
85
+
86
+
# Run a shell script
87
+
codecarbon monitor -- ./benchmark.sh
88
+
89
+
# Run a command with arguments (use quotes for special characters)
0 commit comments