Skip to content

Commit

Permalink
Merge pull request #491 from mlco2/bump-2.3.3
Browse files Browse the repository at this point in the history
Release the version 2.3.3 of the package
  • Loading branch information
benoit-cty committed Jan 22, 2024
2 parents 66193dc + 5610c56 commit d2cea51
Show file tree
Hide file tree
Showing 30 changed files with 349 additions and 389 deletions.
2 changes: 1 addition & 1 deletion .conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "2.3.2" %}
{% set version = "2.3.3" %}

package:
name: codecarbon
Expand Down
2 changes: 1 addition & 1 deletion codecarbon/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.2"
__version__ = "2.3.3"
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 hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: bd7c175b3ee5838f9a80151ba7088fea
config: 10de18174a6a2282f63586273ab506fe
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/_sources/methodology.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Apple Silicon Chips (M1, M2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Apple Silicon Chips contain both the CPU and the GPU.

Codecarbon tracks Apple Silicon Chip energy consumption using ``powermetrics``. It should be available natively on you mac.
Codecarbon tracks Apple Silicon Chip energy consumption using ``powermetrics``. It should be available natively on any mac.
However this tool is only usable with ``sudo`` rights and to our current knowledge, there are no other options to track the energy consumption of the Apple Silicon Chip without administrative rights
(if you know of any solution for this do not hesitate and `open an issue with your proposed solution <https://github.com/mlco2/codecarbon/issues/>`_).

Expand Down
22 changes: 0 additions & 22 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down Expand Up @@ -674,16 +670,6 @@ dd {
margin-left: 30px;
}

.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}

.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}

dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -752,14 +738,6 @@ 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/css/theme.css

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '2.3.2',
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '2.3.3',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand All @@ -10,4 +11,4 @@ const DOCUMENTATION_OPTIONS = {
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};
};
1 change: 0 additions & 1 deletion docs/_static/pygments.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
Expand Down
26 changes: 9 additions & 17 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string

const _displayItem = (item, searchTerms, highlightTerms) => {
const _displayItem = (item, searchTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;

Expand All @@ -75,24 +75,20 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = contentRoot + dirname;
requestUrl = docUrlRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = contentRoot + docName + docFileSuffix;
requestUrl = docUrlRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr) {
if (descr)
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
Expand All @@ -101,9 +97,6 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
Expand All @@ -122,15 +115,14 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms,
highlightTerms,
searchTerms
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms, highlightTerms);
_displayItem(results.pop(), searchTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
() => _displayNextItem(results, resultCount, searchTerms),
5
);
}
Expand Down Expand Up @@ -368,7 +360,7 @@ const Search = {
// console.info("search results:", Search.lastresults);

// print the results
_displayNextItem(results, results.length, searchTerms, highlightTerms);
_displayNextItem(results, results.length, searchTerms);
},

/**
Expand Down
16 changes: 3 additions & 13 deletions docs/_static/sphinx_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,14 @@ const _highlight = (node, addItems, text, className) => {
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
rest,
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);

if (isInSVG) {
const rect = document.createElementNS(
Expand Down Expand Up @@ -145,10 +140,5 @@ const SphinxHighlight = {
},
};

_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
34 changes: 17 additions & 17 deletions docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CodeCarbon API &mdash; CodeCarbon 2.3.2 documentation</title>
<title>CodeCarbon API &mdash; CodeCarbon 2.3.3 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<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=67b02a41"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Parameters" href="parameters.html" />
<link rel="prev" title="Quickstart" href="usage.html" />
<link rel="prev" title="Quickstart" href="usage.html" />
</head>

<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="index.html" class="icon icon-home">
CodeCarbon
</a>
Expand Down Expand Up @@ -92,11 +92,11 @@
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="codecarbon-api">
<span id="api"></span><h1>CodeCarbon API<a class="headerlink" href="#codecarbon-api" title="Link to this heading"></a></h1>
<span id="api"></span><h1>CodeCarbon API<a class="headerlink" href="#codecarbon-api" title="Permalink to this heading"></a></h1>
<section id="id1">
<h2>CodeCarbon API<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
<h2>CodeCarbon API<a class="headerlink" href="#id1" title="Permalink 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>
Expand Down Expand Up @@ -164,7 +164,7 @@ <h2>CodeCarbon API<a class="headerlink" href="#id1" title="Link to this heading"
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
Expand All @@ -175,7 +175,7 @@ <h2>CodeCarbon API<a class="headerlink" href="#id1" title="Link to this heading"
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>

</body>
</html>
</html>
32 changes: 16 additions & 16 deletions docs/comet.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Comet Integration &mdash; CodeCarbon 2.3.2 documentation</title>
<title>Comet Integration &mdash; CodeCarbon 2.3.3 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<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=67b02a41"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Output" href="output.html" />
<link rel="prev" title="Examples" href="examples.html" />
<link rel="prev" title="Examples" href="examples.html" />
</head>

<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="index.html" class="icon icon-home">
CodeCarbon
</a>
Expand Down Expand Up @@ -89,9 +89,9 @@
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="comet-integration">
<span id="comet"></span><h1>Comet Integration<a class="headerlink" href="#comet-integration" title="Link to this heading"></a></h1>
<span id="comet"></span><h1>Comet Integration<a class="headerlink" href="#comet-integration" title="Permalink to this heading"></a></h1>
<p>CodeCarbon can be automatically integrated with <a class="reference external" href="https://www.comet.ml/site/">Comet</a> for experiment tracking and visualization. Comet provides data scientists with powerful tools to track, compare, explain, and reproduce their experiments. Now, with CodeCarbon you can easily track the carbon footprint of your jobs along with your training metrics, hyperparameters, dataset samples, artifacts, and more.</p>
<a class="reference internal image-reference" href="_images/comet-workspace.png"><img alt="Summary" class="align-center" src="_images/comet-workspace.png" style="width: 700px; height: 400px;" /></a>
<p>To get started with the Comet-CodeCarbon integration, make sure you have comet-ml installed:</p>
Expand Down Expand Up @@ -128,7 +128,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
Expand All @@ -139,7 +139,7 @@
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>

</body>
</html>
</html>
2 changes: 1 addition & 1 deletion docs/edit/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "BCG GAMMA, Comet.ml, Haverford College, MILA, Data For Good"

# The full version, including alpha/beta/rc tags
release = "2.3.2"
release = "2.3.3"


# -- General configuration ---------------------------------------------------
Expand Down

0 comments on commit d2cea51

Please sign in to comment.