Welcome to CarbonAI’s documentation!¶
This project aims at creating a python package that allows you to monitor the power consumption and CO2 emissions of any python function.
Getting Started¶
See the Installation page to learn more details on how to install the package on your platform.
In most cases, it’s as simple as
pip install carbonai
Here is an example of usage :
from carbonai import PowerMeter
power_meter = PowerMeter(project_name="MNIST classifier")
@power_meter.measure_power(
package="sklearn",
algorithm="RandomForestClassifier",
data_type="tabular",
data_shape=your_data.shape,
algorithm_params="n_estimators=300, max_depth=15",
comments="Classifier trained on the MNIST dataset, 3rd test"
)
def my_func(arg1, arg2, ...):
# Do something
For more examples, check the Examples page
For more information on how to use the package, check the API Reference.
For more information on the data collected, check the Data information.
Green AI¶
With this package, we try to raise developers’ awareness of the AI’s carbon footprint.
To get more details on green AI, see Context. If you still have more questions or want to get in touch, Contact us.
Notes¶
Warning
This package may log private data (username, country, project_name). If you do not provide any api_endpoint, we will never have access to this data.
On the other hand, if you chose to share your data with us (by using our endpoint: https://ngji0jx9dc.execute-api.eu-west-3.amazonaws.com/post_new_item ), we commit to anonymize any data shared.