mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1k stars 157 forks source link

Explain dashboard usage in README #521

Open jonas4climate opened 3 months ago

jonas4climate commented 3 months ago

Description

I wanted to test out the project, so I ran the initialization and wanted to view the emission tracking using the dashboard mentioned in the README. However, I don't understand how the dashboard works or how to view my currently running project on it.

What I Did

Step 1:

Ran Jupyter Notebook:

!codecarbon init
!echo "log_level = DEBUG\nsave_to_api = True" >> .codecarbon.config
!codecarbon monitor
# Happy with just testing it out without any code running

Step 2: Go to https://dashboard.codecarbon.io/ Here I don't know how to proceed. The overview seems global but I assumed I will be able to track my local project, however not sure how to. Do I need to specify a name somewhere and select it from the projects list perhaps?

It would be nice if the mandatory steps to use the dashboard intuitively are explained in the README

LuisBlanche commented 3 months ago

Hi Jonas ! Thanks for using CodeCarbon There are some ongoing pull requests to improve the Dashboard and CLI user Experience. The idea is that there is a hierarchy Organisation > Team > Project > Experiment, and as of now you can find your experiment by knowing in which Project of which Team of which Organization it belongs to. Currently the only way to create organisations, projects or teams is through the (OpenAPI interface, or by sending queries to the API.

In a future release you will have the functionalities to create those directly from the codecarbon CLI or from the dashboard configuration page.

benoit-cty commented 2 months ago

In .codecarbon.config you will find the experiment_id but yes it is hard to find it in the dashboard. @alencon is working on it.

You could get the total of your runs by calling:

curl -X 'GET' \
  'https://api.codecarbon.io/runs/YOUR_EXPERIMENT_ID_HERE/sums/?token=jessica' \
  -H 'accept: application/json' \
  -H 'x_token: fake-super-secret-token'