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
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ What types of changes does your code introduce? Put an `x` in all the boxes that

## AI Usage Disclosure

Please refer to [docs/how-to/ai-policy.md](https://docs.codecarbon.io/how-to/ai_policy/) for detailed guidelines on how to disclose AI usage in your PR. Accurately completing this section is mandatory.
Please refer to [docs/how-to/ai-policy.md](https://docs.codecarbon.io/latest/how-to/ai_policy/) for detailed guidelines on how to disclose AI usage in your PR. Accurately completing this section is mandatory.

- [ ] 🟥 AI-vibecoded: You cannot explain the logic. Car analogy : the car drive by itself, you are outside it and just tell it where to go.
- [ ] 🟠 AI-generated: Car analogy : the car drive by itself, you are inside and give instructions.
Expand All @@ -32,7 +32,7 @@ Go over all the following points, and put an `x` in all the boxes that apply.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **[docs/how-to/contributing.md](https://docs.codecarbon.io/how-to/contributing/)** document.
- [ ] I have read the **[docs/how-to/contributing.md](https://docs.codecarbon.io/latest/how-to/contributing/)** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ conda activate your_env
pip install codecarbon
```

More installation options: [installation docs](https://docs.codecarbon.io/how-to/installation/).
More installation options: [installation docs](https://docs.codecarbon.io/latest/how-to/installation/).

## Quickstart (Python)

Expand All @@ -41,7 +41,7 @@ emissions = tracker.stop()
print(f"Emissions: {emissions} kg CO₂")
```

[**Learn more** →](https://docs.codecarbon.io/tutorials/first-tracking/)
[**Learn more** →](https://docs.codecarbon.io/latest/tutorials/first-tracking/)

## Quickstart (CLI)

Expand All @@ -57,7 +57,7 @@ Detect your hardware:
codecarbon detect
```

Full CLI guide: [CLI tutorial](https://docs.codecarbon.io/tutorials/cli/).
Full CLI guide: [CLI tutorial](https://docs.codecarbon.io/latest/tutorials/cli/).

## Configuration

Expand All @@ -68,34 +68,34 @@ You can configure CodeCarbon using:
- `CODECARBON_*` environment variables
- Python arguments (`EmissionsTracker(...)`)

Configuration precedence and examples: [configuration guide](https://docs.codecarbon.io/how-to/configuration/).
Configuration precedence and examples: [configuration guide](https://docs.codecarbon.io/latest/how-to/configuration/).

## How it works

We created a Python package that estimates your hardware electricity power consumption (GPU + CPU + RAM) and we apply to it the carbon intensity of the region where the computing is done.

![calculation Summary](docs/images/calculation.png)

We explain more about this calculation in the [**Methodology**](https://docs.codecarbon.io/explanation/methodology/) section of the documentation.
We explain more about this calculation in the [**Methodology**](https://docs.codecarbon.io/latest/explanation/methodology/) section of the documentation.

## Visualize

You can visualize your experiment emissions on the [dashboard](https://dashboard.codecarbon.io/) or locally with [carbonboard](https://docs.codecarbon.io/how-to/visualize/).
You can visualize your experiment emissions on the [dashboard](https://dashboard.codecarbon.io/) or locally with [carbonboard](https://docs.codecarbon.io/latest/how-to/visualize/).

![dashboard](docs/images/dashboard.png)

## Quick links

| Section | Description |
|---------|-------------|
| [Quickstart](https://docs.codecarbon.io/tutorials/first-tracking/) | Get started in 5 minutes |
| [Installation](https://docs.codecarbon.io/how-to/installation/) | Install CodeCarbon |
| [CLI Tutorial](https://docs.codecarbon.io/tutorials/cli/) | Track emissions from the command line |
| [Python API Tutorial](https://docs.codecarbon.io/tutorials/python-api/) | Track emissions in Python code |
| [Comparing Model Efficiency](https://docs.codecarbon.io/tutorials/comparing-model-efficiency/) | Measure carbon efficiency across ML models |
| [API Reference](https://docs.codecarbon.io/reference/api/) | Full parameter documentation |
| [Framework examples (scikit-learn)](https://docs.codecarbon.io/how-to/scikit-learn/) | Task-oriented ML framework examples |
| [Methodology](https://docs.codecarbon.io/explanation/methodology/) | How emissions are calculated |
| [Quickstart](https://docs.codecarbon.io/latest/tutorials/first-tracking/) | Get started in 5 minutes |
| [Installation](https://docs.codecarbon.io/latest/how-to/installation/) | Install CodeCarbon |
| [CLI Tutorial](https://docs.codecarbon.io/latest/tutorials/cli/) | Track emissions from the command line |
| [Python API Tutorial](https://docs.codecarbon.io/latest/tutorials/python-api/) | Track emissions in Python code |
| [Comparing Model Efficiency](https://docs.codecarbon.io/latest/tutorials/comparing-model-efficiency/) | Measure carbon efficiency across ML models |
| [API Reference](https://docs.codecarbon.io/latest/reference/api/) | Full parameter documentation |
| [Framework examples (scikit-learn)](https://docs.codecarbon.io/latest/how-to/scikit-learn/) | Task-oriented ML framework examples |
| [Methodology](https://docs.codecarbon.io/latest/explanation/methodology/) | How emissions are calculated |
| [EcoLogits](https://ecologits.ai/) | Track emissions from GenAI API calls |

## Links
Expand Down
2 changes: 1 addition & 1 deletion codecarbon/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def config():
overwrite_local_config("api_key", api_key, path=file_path)
show_config(file_path)
print(
"Consult [link=https://docs.codecarbon.io/how-to/configuration/]configuration documentation[/link] for more configuration options"
"Consult [link=https://docs.codecarbon.io/latest/how-to/configuration/]configuration documentation[/link] for more configuration options"
)


Expand Down
2 changes: 1 addition & 1 deletion codecarbon/core/powermetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _has_powermetrics_sudo() -> bool:
"""Not using PowerMetrics, sudo password prompt detected.
If you want to enable Powermetrics please modify your sudoers file
as described in :
https://docs.codecarbon.io/explanation/methodology/#power-usage
https://docs.codecarbon.io/latest/explanation/methodology/#power-usage
"""
)
return False
Expand Down
2 changes: 1 addition & 1 deletion codecarbon/external/ram.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RAM(BaseHardware):
In V3, we need to improve the accuracy of the RAM power estimation.
Because the power consumption of RAM is not linear with the amount of memory used,

See https://docs.codecarbon.io/explanation/methodology/#ram for details on the RAM
See https://docs.codecarbon.io/latest/explanation/methodology/#ram for details on the RAM
power estimation methodology.

"""
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/agent-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ uv run task -l
## Documentation and Help

### Key Documentation Files
- **[CONTRIBUTING.md](https://docs.codecarbon.io/how-to/contributing/)**: Detailed contribution guidelines and setup
- **[CONTRIBUTING.md](https://docs.codecarbon.io/latest/how-to/contributing/)**: Detailed contribution guidelines and setup
- **[README.md](https://github.com/mlco2/codecarbon/blob/master/README.md)**: Project overview and quickstart
- **[carbonserver/README.md](https://github.com/mlco2/codecarbon/blob/master/carbonserver/README.md)**: API architecture and database schema
- **[webapp/README.md](https://github.com/mlco2/codecarbon/blob/master/webapp/README.md)**: Next.js dashboard setup
Expand All @@ -165,7 +165,7 @@ The repository includes VS Code launch configurations in `docs/how-to/contributi
- Testing codecarbon CLI monitor

### Getting Help
- **[FAQ](https://docs.codecarbon.io/explanation/faq/)**
- **[FAQ](https://docs.codecarbon.io/latest/explanation/faq/)**
- **[Documentation](https://docs.codecarbon.io)**
- **[Issues](https://github.com/mlco2/codecarbon/issues)**

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/ai_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AI models often hallucinate comments or reinvent existing utilities.

If you are an AI agent (GitHub Copilot, CodeRabbit, etc.) reviewing a PR for CodeCarbon, you must follow the repository's dedicated reviewer instructions.

The **canonical and up-to-date instructions for AI reviewers** are maintained in [`.github/copilot-instructions.md`](https://docs.codecarbon.io/how-to/agent-instructions/). That document defines:
The **canonical and up-to-date instructions for AI reviewers** are maintained in [`.github/copilot-instructions.md`](https://docs.codecarbon.io/latest/how-to/agent-instructions/). That document defines:

- The expected reviewer persona and responsibilities
- The checks to perform on PR descriptions, code, tests, and comments
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<!-- TOC --><a name="have-a-question"></a>
## </a> Have a Question?

Please see the [FAQ](https://docs.codecarbon.io/explanation/faq/) for questions.
Please see the [FAQ](https://docs.codecarbon.io/latest/explanation/faq/) for questions.


<!-- TOC --><a name="found-a-bug"></a>
Expand Down Expand Up @@ -148,7 +148,7 @@ To test CodeCarbon, it is useful to stress your computer to make it use its full

- 7Zip is often already installed, running it with `7z b` makes a quick CPU test.
- [GPU-burn](https://github.com/wilicc/gpu-burn) will load test the GPU for a configurable duration.
- To test the CPU : `stress-ng --cpu 0 --cpu-method matrixprod --metrics-brief --rapl --perf -t 60s` See [our documentation](https://docs.codecarbon.io/how-to/test-on-scaleway/) to install it.
- To test the CPU : `stress-ng --cpu 0 --cpu-method matrixprod --metrics-brief --rapl --perf -t 60s` See [our documentation](https://docs.codecarbon.io/latest/how-to/test-on-scaleway/) to install it.
- To do useful computation while testing [Folding At Home](https://foldingathome.org/) is a good option.
- [OCCT](https://www.ocbase.com/download) is a proprietary tool but free for non-commercial use and available for Windows and Linux.

Expand Down
4 changes: 2 additions & 2 deletions webapp/src/app/(dashboard)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ export default function HomePage() {
For more information, please refer to the documentation:
<br />
<a
href="https://docs.codecarbon.io/tutorials/cli/"
href="https://docs.codecarbon.io/latest/tutorials/cli/"
target="_blank"
>
https://docs.codecarbon.io/tutorials/cli/
https://docs.codecarbon.io/latest/tutorials/cli/
</a>
</CardDescription>
</CardHeader>
Expand Down
Loading