-
Notifications
You must be signed in to change notification settings - Fork 253
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
W&B wandb support #699
Merged
Merged
W&B wandb support #699
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2ec9e84
[not for land] W&B wandb support
msaroufim 1d5ba4c
mutually exclusive
msaroufim 771ed9c
lint
msaroufim f4da960
another round of feedback
msaroufim e5bb635
Merge branch 'main' into msaroufim/wandb
msaroufim b5a50cd
lint
msaroufim 7824be6
more lint
msaroufim f1a586f
fix
msaroufim 6e55afa
Remove changes to llama3 8b config
msaroufim e2c4060
revert changes to device monitor
msaroufim a1b1a8d
Update README.md
msaroufim b4cf6a3
updates
msaroufim b5e0ebf
Merge branch 'msaroufim/wandb' of https://github.com/pytorch/torchtit…
msaroufim 1dad36d
udpate readme
msaroufim 8e5e03b
1 line update
msaroufim 842a7c4
Update metrics.py
msaroufim f923d97
Update metrics.py
msaroufim 30a13f5
Update metrics.py
msaroufim cce9f42
Update metrics.py
msaroufim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ sentencepiece | |
tiktoken | ||
blobfile | ||
tabulate | ||
wandb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Metrics | ||
|
||
We support automatically collecting metrics such as | ||
1. High level system metrics such as MFU, average loss, max loss and words per second along with some | ||
2. Memory metrics to measure max VRAM consumption and the number of OOMs | ||
3. Timing metrics to measure data loading bottlenecks | ||
|
||
Those metrics can then be visualized in either a TensorBoard or WandDB dashboard | ||
|
||
## TensorBoard | ||
|
||
To visualize TensorBoard metrics of models trained on a remote server via a local web browser: | ||
|
||
1. Make sure `metrics.enable_tensorboard` option is set to true in model training (either from a .toml file or from CLI). | ||
|
||
2. Set up SSH tunneling, by running the following from local CLI | ||
``` | ||
ssh -L 6006:127.0.0.1:6006 [username]@[hostname] | ||
``` | ||
|
||
3. Inside the SSH tunnel that logged into the remote server, go to the torchtitan repo, and start the TensorBoard backend | ||
``` | ||
tensorboard --logdir=./outputs/tb | ||
``` | ||
|
||
4. In the local web browser, go to the URL it provides OR to http://localhost:6006/. | ||
|
||
## Weights and Biases | ||
|
||
Weights and Biases will automatically send metrics to a remote server if you login with `wandb login` | ||
|
||
So all you need to do is make sure that `metrics.enable_wandb` is enabled | ||
|
||
For an example you can inspect [debug_model.toml](../train_configs/debug_model.toml) | ||
|
||
Note that if both W&B and Tensorboard are enabled then we will prioritize W&B. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was flipping the
enable_color_printing
default intended? If so, the actionstore_true
does not fit well anymore. It's now true by default