Skip to content

Conversation

@stas00
Copy link
Contributor

@stas00 stas00 commented Jul 24, 2021

This PR plugs in https://github.com/mlco2/codecarbon/ via:

 --codecarbon-dir $CODECARBON_PATH 

Currently requires mlco2/codecarbon#236 commit

@jaketae

@stas00 stas00 mentioned this pull request Jul 24, 2021
@TevenLeScao
Copy link
Collaborator

Sorry, is this ready to be merged? I am unsure from your initial comment :)

@stas00
Copy link
Contributor Author

stas00 commented Jul 26, 2021

Not yet, Waiting for the codecarbon group to address the issue above.

@stas00
Copy link
Contributor Author

stas00 commented Jul 27, 2021

blocking issue: mlco2/codecarbon#217

@stas00
Copy link
Contributor Author

stas00 commented Aug 13, 2021

Current solution: bigscience-workshop/codecarbon#1

update: the maintainers created a different solution, see the next comment.

@stas00
Copy link
Contributor Author

stas00 commented Aug 22, 2021

@jaketae, please have a look before we merge this.

If you want to test, first install mlco2/codecarbon#236

Thanks

@jaketae
Copy link
Member

jaketae commented Aug 22, 2021

Thanks for keeping me in the loop. I've checked the upstream PR. I also recall there was another PR before this one, but I think the more recent solution suits our purpose better. I think we can merge this one!

@stas00
Copy link
Contributor Author

stas00 commented Aug 22, 2021

once they merge their side, yes. Thank you for reviewing, @jaketae.

@stas00
Copy link
Contributor Author

stas00 commented Aug 25, 2021

mlco2/codecarbon#236 is in so merging this.

@stas00 stas00 merged commit 350fb90 into bigscience-workshop:main Aug 25, 2021
@stas00 stas00 deleted the cc2 branch August 25, 2021 19:21
stas00 added a commit that referenced this pull request Aug 25, 2021
* add codecarbon

* switch to offline

* rework to also restart the tracker at each checkpoint save to ensure as little as possible data is lost

* adjust API to match bigscience-workshop/codecarbon#1

* fix logging

* new implementation based on mlco2/codecarbon#236

* add test

* update requirements
Comment on lines +157 to +158
if not hasattr(args, 'codecarbon_dir'):
return
Copy link
Member

@thomasw21 thomasw21 Aug 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should check if it's none. @TevenLeScao

Basically this line adds the attribute, but assigns None when not set: https://github.com/bigscience-workshop/Megatron-DeepSpeed/pull/15/files#diff-5f7d1ddfb0666cb6bb4ec0f07fd2fd7b1cd0354f421df5560489091db2ff5a55R455
So I believe hasattr(args, "codecarbon_dir") will return True. Despite having no paths.

#74

adammoody pushed a commit to adammoody/Megatron-DeepSpeed that referenced this pull request Dec 20, 2021
* add direct meg-ds to hf format script (bigscience-workshop#110)

* add direct meg-ds to hf format script (part2) (bigscience-workshop#111)

* add direct meg-ds to hf format script

* split into 2 function

* update the usage doc

* make scripts executable

* add shebang

Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
Co-authored-by: Stas Bekman <stas@stason.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants