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.
Description
This PR aims to implement #2434 and add wandb logging support to MaxText.
Implementation details
The implementation of wandb logging simply follows the style of other logging interfaces.
Initialization
Logging step
Usage
python -u -m src.MaxText.train src/MaxText/configs/base.yml \ ... enable_wandb=True \ wandb_project_name=xxx \ wandb_run_name=yyy \ ...Limitations
Currently this implementation does not support resuming from an existing wandb run. In order to resume, we need to first retrieve the
run_idfrom somewhere, then doIt makes sense to save the run_ids at some cache dir inside of the maxtext repo, but I don't know whether that's consistent with the design philosophy of this project.
Tests
Example training script:
Outputs:
Wandb output:

Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.