[Feature addition] Clearml logger integration
Context
What is the purpose of this PR? Is it to
- [x] add a new feature
- [ ] fix a bug
- [ ] update tests and/or documentation
- [ ] other (please add here)
Please link to any issues this PR addresses.
Changelog
What are the changes made in this PR? Adding support for clearml logging, this is an alternative to the wandb logging. Example output of the logs are present in the link below. ( select scalar for the loss, token/s and learning rate).
link to the logging: https://app.clear.ml/projects/da01459b37f2445d9ceee83be9eba7b8/experiments/6101c2d90d0b465188e2668d2b8874d3/output/execution
NOTE: the logging page requires clearml-account.
Test plan
Please make sure to do each of the following if applicable to your PR. (If you're not sure about any one of these just ask and we will happily help.)
- [x] run pre-commit hooks and linters (make sure you've first installed via
pre-commit install) - [x] add unit tests for any new functionality
- [x] update docstrings for any new or updated methods or classes
- [x] run unit tests via
pytest tests - [x] run recipe tests via
pytest tests -m integration_test - [x] manually run any new or modified recipes with sufficient proof of correctness
- [x] include relevant commands and any other artifacts in this summary (pastes of loss curves, eval results, etc.)
:link: Helpful Links
:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/895
- :page_facing_up: Preview Python docs built from this PR
Note: Links to docs will display an error until the docs builds have been completed.
This comment was automatically generated by Dr. CI and updates every 15 minutes.
Hi @Prakyathkantharaju!
Thank you for your pull request and welcome to our community.
Action Required
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!
@Prakyathkantharaju Thanks for the contribution!
Can you tell me more about your desire to add this integration to the torchtune library specifically? I'm not super familiar with ClearML Logger. Is this for your personal experiments or work? Why do you prefer this over something like Weights & Biases?
Hi @joecummings ,
Thank you for taking the time to review and comment on the pull request. I wanted to highlight a few advantages of using ClearML over Wandb and Tensorboard:
- ClearML is an open-source project (Apache-2.0) that can be hosted locally, giving you more control over your data.
- ClearML can store data locally, just like Tensorboard, but with a more user-friendly interface for experiment tracking.
- ClearML also has built-in hyperparameter optimization, similar to Wandb.
- ClearML offers input data management options ( pipeline, sync folders structure etc )
Here is the docs for the clearml: https://clear.ml/docs/latest/docs
I believe ClearML strikes a good balance between Tensorboard and Wandb by providing both cloud-based and self-hosted options. However, I welcome your thoughts and feedback. If you don't see much value in this pull request, feel free to close it.
@Prakyathkantharaju really appreciate you opening up this PR, highlighting ecosystem integrations is one of the core principles of torchtune and something we believe makes the ecosystem stronger.
We started with integrations for WandB and Tensorboard since these have come up as feature requests in the user conversations we had. I'd love to get more user signal into this integration before we move this to the core repo. I'd propose the following if you'd be interested:
- Merge this with your fork
- We highlight the fork as a community integration in a new section we're adding to the README
- As more folks look at this and we get requests to merge this into main, we can pull in this change
How does that sound to you?
Hello @kartikayk ,
I think that's a great suggestion. I agree that including every logging system may be excessive, and it would be better to mention it in the readme or documentation.
If you have any specific formatting requirements for the repository, please let me know. I would be more than happy to help in any way I can.
Best regards, PK
@Prakyathkantharaju sounds great! I'd just recommend following the contribution guide (has everything you need) and then merge this with your fork. Once you have this done just comment here and I can add it to the README.
Hello @kartikayk, Done, Its in my main branch now, I have also synced the fork so its up to date now.