Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature addition] Clearml logger integration #895

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Prakyathkantharaju
Copy link

@Prakyathkantharaju Prakyathkantharaju commented Apr 28, 2024

Context

What is the purpose of this PR? Is it to

  • 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.)

  • run pre-commit hooks and linters (make sure you've first installed via pre-commit install)
  • add unit tests for any new functionality
  • update docstrings for any new or updated methods or classes
  • run unit tests via pytest tests
  • run recipe tests via pytest tests -m integration_test
  • manually run any new or modified recipes with sufficient proof of correctness
    • include relevant commands and any other artifacts in this summary (pastes of loss curves, eval results, etc.)

Copy link

pytorch-bot bot commented Apr 28, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/895

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.

@facebook-github-bot
Copy link

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 cla@meta.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 28, 2024
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@joecummings
Copy link
Contributor

@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?

@Prakyathkantharaju
Copy link
Author

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:

  1. ClearML is an open-source project (Apache-2.0) that can be hosted locally, giving you more control over your data.
  2. ClearML can store data locally, just like Tensorboard, but with a more user-friendly interface for experiment tracking.
  3. ClearML also has built-in hyperparameter optimization, similar to Wandb.
  4. 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.

@kartikayk
Copy link
Contributor

@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?

@Prakyathkantharaju
Copy link
Author

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

@kartikayk
Copy link
Contributor

@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.

@Prakyathkantharaju
Copy link
Author

Hello @kartikayk,
Done, Its in my main branch now, I have also synced the fork so its up to date now.

@ebsmothers ebsmothers mentioned this pull request May 16, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants