Repository: mlco2/codecarbon

Issue:
TypeError when `force_cpu_power` is set in config file with CPU load mode
### Environment

- Python Version: `3.12.10`
- CodeCarbon Version: `3.0.0`
- Operating System: Linux

### Description

When using CodeCarbon's CPU load-based emissions tracking and setting a value for `force_cpu_power` in the configuration file, a `TypeError: can't multiply sequence by non-int of type 'float'` error occurs.

### Steps to Reproduce

1.  Configure CodeCarbon with `force_cpu_power` set in your configuration file (`.codecarbon.config`). For example:
 ```
[codecarbon]
force_cpu_power = 45
```

2.  Run a Python script that utilizes the CodeCarbon emissions tracker in CPU load mode.

### Output

```
[codecarbon INFO @ 17:34:15] Codecarbon is taking the configuration from the local file .../.codecarbon.config
[codecarbon WARNING @ 17:34:15] Multiple instances of codecarbon are allowed to run at the same time.
[codecarbon INFO @ 17:34:15] [setup] RAM Tracking...
[codecarbon INFO @ 17:34:15] [setup] CPU Tracking...
[codecarbon INFO @ 17:34:16] Using user-provided CPU power: 45 Watts
[codecarbon WARNING @ 17:34:16] No CPU tracking mode found. Falling back on estimation based on TDP for CPU. 
 Linux OS detected: Please ensure RAPL files exist at /sys/class/powercap/intel-rapl/subsystem to measure CPU

[codecarbon INFO @ 17:34:16] CPU Model on constant consumption mode: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
[codecarbon WARNING @ 17:34:16] No CPU tracking mode found. Falling back on CPU load mode.
[codecarbon INFO @ 17:34:16] [setup] GPU Tracking...
[codecarbon INFO @ 17:34:16] Tracking Nvidia GPU via pynvml
[codecarbon INFO @ 17:34:16] The below tracking methods have been set up:
                RAM Tracking Method: RAM power estimation model
                CPU Tracking Method: cpu_load
                GPU Tracking Method: pynvml
            
[codecarbon INFO @ 17:34:16] >>> Tracker's metadata:
[codecarbon INFO @ 17:34:16]   Platform system: Linux-6.14.2-arch1-1.1-g14-x86_64-with-glibc2.41
[codecarbon INFO @ 17:34:16]   Python version: 3.12.10
[codecarbon INFO @ 17:34:16]   CodeCarbon version: 3.0.0
[codecarbon INFO @ 17:34:16]   Available RAM : 15.404 GB
[codecarbon INFO @ 17:34:16]   CPU count: 12 thread(s) in 1 physical CPU(s)
[codecarbon INFO @ 17:34:16]   CPU model: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
[codecarbon INFO @ 17:34:16]   GPU count: 1
[codecarbon INFO @ 17:34:16]   GPU model: 1 x NVIDIA GeForce RTX 2060
[codecarbon INFO @ 17:34:19] Emissions data (if any) will be saved to file .../emissions.csv
[codecarbon WARNING @ 17:34:20] graceful shutdown. Exceptions:
[codecarbon WARNING @ 17:34:20] <class 'Exception'>
Traceback (most recent call last):
  File ".../venv/lib/python3.12/site-packages/codecarbon/core/util.py", line 24, in suppress
    yield
  File "/usr/lib/python3.12/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.12/site-packages/codecarbon/emissions_tracker.py", line 439, in start
    hardware.start()
  File "./venv/lib/python3.12/site-packages/codecarbon/external/hardware.py", line 299, in start
    _ = self._get_power_from_cpu_load()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.12/site-packages/codecarbon/external/hardware.py", line 214, in _get_power_from_cpu_load
    power = self._calculate_power_from_cpu_load(tdp, cpu_load, self._model)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../venv/lib/python3.12/site-packages/codecarbon/external/hardware.py", line 188, in _calculate_power_from_cpu_load
    return max(tdp * (cpu_load / 100.0), tdp * 0.1)
               ~~~~^~~~~~~~~~~~~~~~~~~~
TypeError: can't multiply sequence by non-int of type 'float'
[codecarbon WARNING @ 17:34:20] stopping.
```


Discussion:
Thanks for reporting this. The fix is on his way. See https://github.com/mlco2/codecarbon/pull/831

If you are using Python, you could specify the parameter in your Python code instead of the config and it will works.

Sorry for that.



Patch:
diff --git a/codecarbon/_version.py b/codecarbon/_version.py
index 528787cfc..055276878 100644
--- a/codecarbon/_version.py
+++ b/codecarbon/_version.py
@@ -1,1 +1,1 @@
-__version__ = "3.0.0"
+__version__ = "3.0.1"
diff --git a/codecarbon/emissions_tracker.py b/codecarbon/emissions_tracker.py
index 24ee26c4f..9b4294d73 100644
--- a/codecarbon/emissions_tracker.py
+++ b/codecarbon/emissions_tracker.py
@@ -123,14 +123,18 @@ def _set_from_conf(
             # no value provided in the constructor for `name`: check in the conf
             # (using the provided default value)
             value = self._external_conf.get(name, default)
-
-            # parse to `return_type` if needed
-            if return_type is not None:
+            if value is not None and return_type is not None:
                 if return_type is bool:
                     value = str(value).lower() == "true"
                 else:
                     assert callable(return_type)
-                    value = return_type(value)
+                    try:
+                        value = return_type(value)
+                    except (ValueError, TypeError):
+                        logger.error(
+                            f"CONFIG - Value for '{name}' must be of type '{return_type.__name__}'. Got '{value}' instead. It will be ignored."
+                        )
+                        value = None
         # Check conf
         if name == "output_dir":
             if not os.path.exists(value):
@@ -280,10 +284,10 @@ def __init__(
         self._set_from_conf(tracking_mode, "tracking_mode", "machine")
         self._set_from_conf(on_csv_write, "on_csv_write", "append")
         self._set_from_conf(logger_preamble, "logger_preamble", "")
-        self._set_from_conf(force_cpu_power, "force_cpu_power")
-        self._set_from_conf(force_ram_power, "force_ram_power")
+        self._set_from_conf(force_cpu_power, "force_cpu_power", None, float)
+        self._set_from_conf(force_ram_power, "force_ram_power", None, float)
         self._set_from_conf(pue, "pue", 1.0, float)
-        self._set_from_conf(force_mode_cpu_load, "force_mode_cpu_load", False)
+        self._set_from_conf(force_mode_cpu_load, "force_mode_cpu_load", False, bool)
         self._set_from_conf(
             experiment_id, "experiment_id", "5b0fa12a-3dd7-45bb-9766-cc326314d9f1"
         )
diff --git a/docs/.buildinfo b/docs/.buildinfo
index 3e62a9af1..037f452e7 100644
--- a/docs/.buildinfo
+++ b/docs/.buildinfo
@@ -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: d75eb8ce15708524ae1fb27acec993bc
+config: efdde624c3e18e32d8a147d48b8c5ee5
 tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js
index e1ef608cd..12d3d03c1 100644
--- a/docs/_static/documentation_options.js
+++ b/docs/_static/documentation_options.js
@@ -1,5 +1,5 @@
 const DOCUMENTATION_OPTIONS = {
-    VERSION: '3.0.0',
+    VERSION: '3.0.1',
     LANGUAGE: 'en',
     COLLAPSE_INDEX: false,
     BUILDER: 'html',
diff --git a/docs/advanced_installation.html b/docs/advanced_installation.html
index 2491f629d..9f2d6749f 100644
--- a/docs/advanced_installation.html
+++ b/docs/advanced_installation.html
@@ -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.0.0 documentation</title>
+  <title>Advanced Installation &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/api.html b/docs/api.html
index 80938dd25..7358b97ee 100644
--- a/docs/api.html
+++ b/docs/api.html
@@ -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.0.0 documentation</title>
+  <title>CodeCarbon API &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/comet.html b/docs/comet.html
index a725d9343..380475ad8 100644
--- a/docs/comet.html
+++ b/docs/comet.html
@@ -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.0.0 documentation</title>
+  <title>Comet Integration &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/edit/conf.py b/docs/edit/conf.py
index 4b90c69bb..6573a0f7b 100644
--- a/docs/edit/conf.py
+++ b/docs/edit/conf.py
@@ -24,7 +24,7 @@
 
 # The full version, including alpha/beta/rc tags
 
-release = "3.0.0"
+release = "3.0.1"
 
 # -- General configuration ---------------------------------------------------
 
diff --git a/docs/examples.html b/docs/examples.html
index 5dbf40b7a..b0c3fc04f 100644
--- a/docs/examples.html
+++ b/docs/examples.html
@@ -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>Examples &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Examples &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/faq.html b/docs/faq.html
index 8625f26d5..8d52c7d53 100644
--- a/docs/faq.html
+++ b/docs/faq.html
@@ -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>Frequently Asked Questions &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Frequently Asked Questions &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/genindex.html b/docs/genindex.html
index 8c6669582..fee038726 100644
--- a/docs/genindex.html
+++ b/docs/genindex.html
@@ -5,14 +5,14 @@
 <head>
   <meta charset="utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <title>Index &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Index &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/index.html b/docs/index.html
index 935908a5e..a062a98b7 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -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 &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>CodeCarbon &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></script>
       <script src="_static/doctools.js?v=9bcbadda"></script>
       <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
       <script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
diff --git a/docs/installation.html b/docs/installation.html
index 9a594eb16..e1dc5438b 100644
--- a/docs/installation.html
+++ b/docs/installation.html
@@ -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>Installing CodeCarbon &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Installing CodeCarbon &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/methodology.html b/docs/methodology.html
index 9de2d3e9f..baefde0f2 100644
--- a/docs/methodology.html
+++ b/docs/methodology.html
@@ -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>Methodology &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Methodology &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></script>
       <script src="_static/doctools.js?v=9bcbadda"></script>
       <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
       <script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
diff --git a/docs/model_examples.html b/docs/model_examples.html
index 9e2effa65..baccfc99a 100644
--- a/docs/model_examples.html
+++ b/docs/model_examples.html
@@ -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>Model Comparisons &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Model Comparisons &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/motivation.html b/docs/motivation.html
index 8c51900a7..69bdb0aa2 100644
--- a/docs/motivation.html
+++ b/docs/motivation.html
@@ -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>Motivation &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Motivation &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/output.html b/docs/output.html
index 4ae15590c..b8425b11a 100644
--- a/docs/output.html
+++ b/docs/output.html
@@ -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>Output &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Output &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/parameters.html b/docs/parameters.html
index 5ce83f16c..e24c8b4cd 100644
--- a/docs/parameters.html
+++ b/docs/parameters.html
@@ -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>Parameters &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Parameters &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/search.html b/docs/search.html
index 8bb47dba5..9876f0197 100644
--- a/docs/search.html
+++ b/docs/search.html
@@ -5,7 +5,7 @@
 <head>
   <meta charset="utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <title>Search &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Search &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
 
@@ -13,7 +13,7 @@
     
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/to_logger.html b/docs/to_logger.html
index ebffb96ce..587a24096 100644
--- a/docs/to_logger.html
+++ b/docs/to_logger.html
@@ -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>Collecting emissions to a logger &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Collecting emissions to a logger &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/usage.html b/docs/usage.html
index 9196e11d0..273e9be82 100644
--- a/docs/usage.html
+++ b/docs/usage.html
@@ -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>Quickstart &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Quickstart &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/docs/visualize.html b/docs/visualize.html
index 509d0fe0f..318be847b 100644
--- a/docs/visualize.html
+++ b/docs/visualize.html
@@ -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>Visualize &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Visualize &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/pyproject.toml b/pyproject.toml
index bff8f1051..e8748261f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -186,7 +186,7 @@ include = [
 ]
 
 [tool.bumpver]
-current_version = "3.0.0"
+current_version = "3.0.1"
 version_pattern = "MAJOR.MINOR.PATCH[_TAGNUM]"
 
 [tool.bumpver.file_patterns]


Test patch:
diff --git a/docs/test_on_scaleway.html b/docs/test_on_scaleway.html
index 44e82f1ef..bcf846af4 100644
--- a/docs/test_on_scaleway.html
+++ b/docs/test_on_scaleway.html
@@ -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>Test of CodeCarbon on Scaleway hardware &mdash; CodeCarbon 3.0.0 documentation</title>
+  <title>Test of CodeCarbon on Scaleway hardware &mdash; CodeCarbon 3.0.1 documentation</title>
       <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
       <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=acc74ff5"></script>
+      <script src="_static/documentation_options.js?v=08bfcbec"></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>
diff --git a/tests/test_config.py b/tests/test_config.py
index 14f2fae73..3721a6e4d 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -163,6 +163,8 @@ def test_full_hierarchy(self):
             """\
             [codecarbon]
             measure_power_secs=10
+            force_cpu_power=toto
+            force_ram_power=50.5
             output_dir=ERROR:not overwritten
             save_to_file=ERROR:not overwritten
             """
@@ -184,6 +186,8 @@ def test_full_hierarchy(self):
                     project_name="test-project", co2_signal_api_token="signal-token"
                 )
             self.assertEqual(tracker._measure_power_secs, 10)
+            self.assertEqual(tracker._force_cpu_power, None)
+            self.assertEqual(tracker._force_ram_power, 50.5)
             self.assertEqual(tracker._output_dir, "/success/overwritten")
             self.assertEqual(tracker._emissions_endpoint, "http://testhost:2000")
             self.assertEqual(tracker._gpu_ids, [0, 1])