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

Add Weights and Biases Integration #1138

Merged
merged 4 commits into from
Feb 18, 2022
Merged

Conversation

ayulockin
Copy link

@ayulockin ayulockin commented Feb 8, 2022

This PR adds support for Weights and Biases experiment tracking (metric logging).

Usage

I have tested the implementation using the quick start provided with this repo. We can start logging metrics to W&B by passing --log_wandb=True as command line argument, or use config dict. One can also turn log_wandb: True in the overall.yaml file or provide it as external config file.

python run_recbole.py --epochs=10 --log_wandb=True

Result (Feature Addition)

  • Able to easily share the experiments. Here's an example W&B run that shows train and valid metrics from generated by running the quick start.
  • Ability to check out the exact configuration used to train the model. Configs can thus be easily compared across experiments.
  • Keep track of evaluation metrics.
  • Know the exact command used to train the model.
Screen.Recording.2022-02-09.at.3.40.47.AM.mov

Potential Addition

I hope you find it useful. In addition to the feature I have implemented I can potentially add the follow:

  • Log the model checkpoint as W&B Artifacts to version control. This can be done with few lines of code.
  • Log model prediction as W&B Tables. This will allow to evaluate model prediction interactively and query results on W&B dashboard. This will be a bigger implementation project and might require some feedback.

This is an amazing repository which I am going to use for the recently launched H&M Personalized Fashion Recommendations Kaggle competiiton.

@ayulockin
Copy link
Author

Hey @chenyushuo, what do you think about this PR? Do you think it would be useful for the community in general? I would love to make changes as required.

@chenyushuo
Copy link
Collaborator

chenyushuo commented Feb 18, 2022

@ayulockin Hi, sorry for late reply. We have already reviewed your code and made some basic tests by ourselves and we think this feature is quite useful. Thanks for your contribution! We will add docs about this feature into our API Docs later and plan to release this feature in the next version (maybe v1.0.1). You will be invited to review our PR (for docs) if you have time.

About the potential addition, since we are not very familar with the wandb, could you please offer some examples for detailed explanation? Or you can make a new PR for them and we will be happy to review the code and give some feedback.

At last, thanks again for your contribution, it's an excellent feature!

@chenyushuo chenyushuo merged commit 54be56a into RUCAIBox:master Feb 18, 2022
@ayulockin
Copy link
Author

Thank you for the feedback @chenyushuo. I can totally review the PR for docs.

I will make a new PR with the potential addition for you to review. Thanks again.

@2017pxy
Copy link
Member

2017pxy commented Feb 21, 2022

@ayulockin hi, the docs PR has been made, you can review the #1143 and leave your feedback. Many thanks!

@ayulockin
Copy link
Author

Thanks for adding the documentation @2017pxy. It looks good to me. :)

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.

3 participants