Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ api_endpoint = http://localhost:8008
Before using it, you need an experiment_id, to get one, run:

```
codecarbon init
codecarbon login
```

It will ask the API for an experiment_id on the default project and save it to `.codecarbon.config` for you.
Expand Down
2 changes: 1 addition & 1 deletion codecarbon/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.2.0"
__version__ = "3.2.1"
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1179cfac2a69f75fdb97976cfa9a706e
config: 6fab6ba8b08b27f1b70031950c82d429
tags: 645f666f9bcd5a90fca523b33c5a78b7
10 changes: 7 additions & 3 deletions docs/_sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ CodeCarbon API
~~~~~~~~~~~~~~

.. warning::
This mode use the CodeCarbon API to upload the timeseries of your emissions on a central server. All data will be public!
This mode use the CodeCarbon API to upload the timeseries of your emissions on a central server.

Thanks to `CleverCloud <https://www.clever.cloud/>`_ the use of API is free as soon as it remains under certain limits.


.. image:: https://github.com/mlco2/codecarbon/raw/master/carbonserver/Images/code_carbon_archi.png
Expand All @@ -22,11 +24,13 @@ CodeCarbon API
:alt: Summary
:width: 700px

Before using it, you need an experiment_id, to get one, run:
Before using it, you need to create on account on the `CodeCarbon dashboard <https://dashboard.codecarbon.io/>`_

Then login from your terminal:

.. code-block:: console

codecarbon init
codecarbon login

It will create an experiment_id for the default project and save it to ``codecarbon.config``

Expand Down
18 changes: 13 additions & 5 deletions docs/_sources/output.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ input parameter (defaults to the current directory), for each experiment tracked
* - emissions_rate
- emissions divided per duration, in Kg/s
* - cpu_power
- CPU power (W)
- Mean CPU power (W)
* - gpu_power
- GPU power (W)
- Mean GPU power (W)
* - ram_power
- RAM power (W)
- Mean RAM power (W)
* - cpu_energy
- Energy used per CPU (kWh)
* - gpu_energy
Expand Down Expand Up @@ -77,8 +77,16 @@ input parameter (defaults to the current directory), for each experiment tracked
| This is done for privacy protection.
* - ram_total_size
- total RAM available (Go)
* - Tracking_mode:
* - tracking_mode:
- ``machine`` or ``process``(default to ``machine``)
* - cpu_utilization_percent
- Average CPU utilization during tracking period (%)
* - gpu_utilization_percent
- Average GPU utilization during tracking period (%)
* - ram_utilization_percent
- Average RAM utilization during tracking period (%)
* - ram_used_gb
- Average RAM used during tracking period (GB)

.. note::

Expand Down Expand Up @@ -130,7 +138,7 @@ Logfire
Using CodeCarbon with logfire
`````````````````````````````````

`Logfire <https://docs.pydantic.dev/logfire/>`_ is an observability platform.
`Logfire <https://docs.pydantic.dev/logfire/>`_ is an observability platform.

CodeCarbon exposes all its metrics with the suffix `codecarbon_`.

Expand Down
14 changes: 13 additions & 1 deletion docs/_sources/visualize.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ Offline
The package also comes with a ``Dash App`` containing illustrations to understand the emissions logged from various experiments across projects.
The App currently consumes logged information from a CSV file, generated from an in-built logger in the package.

Installation
~~~~~~~~~~~~
The carbonboard visualization tool requires additional dependencies. Install them with:

.. code-block:: bash

pip install codecarbon[carbonboard]

.. note::
The ``viz-legacy`` extra is deprecated but still works for backwards compatibility. It will be removed in v4.0.0. Please use ``carbonboard`` instead.

Usage
~~~~~
The App can be run by executing the below CLI command that needs following arguments:

- ``filepath`` - path to the CSV file containing logged information across experiments and projects
Expand Down Expand Up @@ -107,6 +120,5 @@ The app also provides a visualization of regional carbon intensity of electricit
:alt: carbon intensity carbon_map
:width: 750px

Note that for now, all data sent to CodeCarbon API are public.


8 changes: 8 additions & 0 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,14 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '3.1.1',
VERSION: '3.2.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
13 changes: 5 additions & 8 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,9 @@ const Search = {
// perform the search on the required terms
searchTerms.forEach((word) => {
const files = [];
// find documents, if any, containing the query word in their text/title term indices
// use Object.hasOwnProperty to avoid mismatching against prototype properties
const arr = [
{ files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
{ files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
{ files: terms[word], score: Scorer.term },
{ files: titleTerms[word], score: Scorer.title },
];
// add support for partial matches
if (word.length > 2) {
Expand Down Expand Up @@ -549,9 +547,8 @@ const Search = {

// set score for the word in each file
recordFiles.forEach((file) => {
if (!scoreMap.has(file)) scoreMap.set(file, new Map());
const fileScores = scoreMap.get(file);
fileScores.set(word, record.score);
if (!scoreMap.has(file)) scoreMap.set(file, {});
scoreMap.get(file)[word] = record.score;
});
});

Expand Down Expand Up @@ -590,7 +587,7 @@ const Search = {
break;

// select one (max) score for the file.
const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w)));
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
// add result to the result list
results.push([
docNames[file],
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced_installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Advanced Installation &mdash; CodeCarbon 3.1.1 documentation</title>
<title>Advanced Installation &mdash; CodeCarbon 3.2.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />


<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=796a81b5"></script>
<script src="_static/documentation_options.js?v=eb155f5e"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand Down
12 changes: 7 additions & 5 deletions docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CodeCarbon API &mdash; CodeCarbon 3.1.1 documentation</title>
<title>CodeCarbon API &mdash; CodeCarbon 3.2.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />


<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=796a81b5"></script>
<script src="_static/documentation_options.js?v=eb155f5e"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand Down Expand Up @@ -101,14 +101,16 @@
<h2>CodeCarbon API<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This mode use the CodeCarbon API to upload the timeseries of your emissions on a central server. All data will be public!</p>
<p>This mode use the CodeCarbon API to upload the timeseries of your emissions on a central server.</p>
<p>Thanks to <a class="reference external" href="https://www.clever.cloud/">CleverCloud</a> the use of API is free as soon as it remains under certain limits.</p>
</div>
<a class="reference internal image-reference" href="https://github.com/mlco2/codecarbon/raw/master/carbonserver/Images/code_carbon_archi.png"><img alt="Summary" class="align-center" src="https://github.com/mlco2/codecarbon/raw/master/carbonserver/Images/code_carbon_archi.png" style="width: 700px; height: 400px;" />
</a>
<a class="reference internal image-reference" href="https://github.com/mlco2/codecarbon/raw/master/carbonserver/Images/CodecarbonDB.jpg"><img alt="Summary" class="align-center" src="https://github.com/mlco2/codecarbon/raw/master/carbonserver/Images/CodecarbonDB.jpg" style="width: 700px;" />
</a>
<p>Before using it, you need an experiment_id, to get one, run:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">codecarbon init</span>
<p>Before using it, you need to create on account on the <a class="reference external" href="https://dashboard.codecarbon.io/">CodeCarbon dashboard</a></p>
<p>Then login from your terminal:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">codecarbon login</span>
</pre></div>
</div>
<p>It will create an experiment_id for the default project and save it to <code class="docutils literal notranslate"><span class="pre">codecarbon.config</span></code></p>
Expand Down
4 changes: 2 additions & 2 deletions docs/comet.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Comet Integration &mdash; CodeCarbon 3.1.1 documentation</title>
<title>Comet Integration &mdash; CodeCarbon 3.2.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />


<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=796a81b5"></script>
<script src="_static/documentation_options.js?v=eb155f5e"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand Down
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/api.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/comet.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/examples.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/faq.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/index.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/installation.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/methodology.doctree
Binary file not shown.
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/motivation.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/output.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/parameters.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/rapl.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/test_on_scaleway.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/to_logger.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/usage.doctree
Binary file not shown.
Binary file removed docs/edit/_build/doctrees/visualize.doctree
Binary file not shown.
Loading
Loading