pyronear / pyro-vision

Computer vision library for wildfire detection 🌲 Deep learning models in PyTorch & ONNX for inference on edge devices (e.g. Raspberry Pi)
https://pyronear.org/pyro-vision/
Apache License 2.0
52 stars 24 forks source link

feat: Added codecarbon integration #140

Closed frgfm closed 2 years ago

frgfm commented 2 years ago

This PR introduces the following modifications:

Any feedback is welcome!

cc @benoit-cty

codecov[bot] commented 2 years ago

Codecov Report

Merging #140 (7996894) into master (48262ca) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 7996894 differs from pull request most recent head 4a5ed7c. Consider uploading reports for the commit 4a5ed7c to get more accurate results

@@           Coverage Diff           @@
##           master     #140   +/-   ##
=======================================
  Coverage   89.16%   89.16%           
=======================================
  Files           8        8           
  Lines         203      203           
=======================================
  Hits          181      181           
  Misses         22       22           
Flag Coverage Δ
unittests 89.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 48262ca...4a5ed7c. Read the comment docs.

MateoLostanlen commented 2 years ago

Hi @frgfm thanks for this ! I do it work ? do we have an associated login ? or anyone cloning this repo will impact our score ?

frgfm commented 2 years ago

Good questions, and that's why this hasn't been merged yet:

The question now is what can we do and what do we want to do about people cloning the repo 🤔

A suggestion I had in mind:

What do you think?

MateoLostanlen commented 2 years ago

I think it's better not to track public users and to offer access to anyone who is close to the project and making them aware of gpu abuse.

benoit-cty commented 2 years ago

Hello, Your current code will work with no config file : the user emissions will be tracked but not send to the CodeCarbon API. Your user will have a local file emissions.csv. It's the default behavior of CodeCarbon. So I think you are fine: When you are in an environment with proper config file, your emissions will go into the CodeCarbon API.

frgfm commented 2 years ago

In another PR, we can throw a warning when there is no config file (so that core team doesn't forget to set it when running a training)