Log learning rate
Author: muellerzr
Pull request: yes
Labels: name: WIP

# What does this PR do?

Logs the learning rate on each logging instance when training, and specifically uses scientific notation to save on space

Fulfills https://github.com/huggingface/transformers/issues/27631


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker 

Example output: 
![image](https://github.com/huggingface/transformers/assets/7831895/ea85f274-0390-4d83-8a2b-3db4b9f0bb3f)


We only use the scientific notation when printing on screen. Everything else gets the full float

Comments:
Is it a draft or should i review? 

@ArthurZucker still draft, hit one failure when I was trying it so should be good next week hopefully 🤞 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

@muellerzr Hello and Happy New Year! Give me a hint on how this issue is going?

Not much progress yet due to the holidays, it may be another week before I can revisit it if you want to build off what I have @blademoon and try and get it the rest of the way, feel free :) 

@muellerzr Good afternoon Zach. Happy New Year 2024. Best of luck in the new year. I am also "rocking out" after the weekend. Today I continued working on the translation of HuggingFace courses into Russian. So there is not so much time to join the development (unfortunately). I don't work for HugginFace, I translate courses as a volunteer. Thanks again for taking on the implementation of this feature, I've been asked a couple of times on the forum when it will be in the official version. 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_27660). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.