mlco2 / codecarbon

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

feat: accept list of ints in gpu_ids param #519

Closed inimaz closed 7 months ago

inimaz commented 8 months ago

Allow users to specify a list of ints for the gpu_ids parameter Closes #518

Before this PR

tracker = EmissionsTracker(gpu_ids="1,3,5")

After this PR

tracker = EmissionsTracker(gpu_ids="1,3,5")

or

tracker = EmissionsTracker(gpu_ids=[1,3,5])