-
Notifications
You must be signed in to change notification settings - Fork 448
Fix rngs used for training #2938
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Also fix the unit tests to make them run in different tpu VMs
| """ | ||
| # Create a mesh shape for a 5D mesh. | ||
| devices = np.array(jax.devices()).reshape((4, 1, 1, 1, 1)) | ||
| devices = np.array(jax.devices()[:4]).reshape((4, 1, 1, 1, 1)) |
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.
I guess you met issue when testing on other tpu topology? Shall we instead do something like
num_devices = jax.device_count()
devices = np.array(jax.devices()).reshape((num_devices, 1, 1, 1, 1))
| per_device_batch_size_increment=1.0, | ||
| global_rampup_samples=60, | ||
| # global_rampup_samples: (rampup increment number) * (Samples for initial 5 steps) | ||
| global_rampup_samples=3 * (1 * jax.device_count() * 5), |
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.
@aireenmei could you help take a quick look?
Description
Fix rngs used for training.
Also fix the unit tests to make them run in different tpu VMs
Tests
Run a training successfully.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.