-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1295 from AI-Hypercomputer:mtc
PiperOrigin-RevId: 729682186
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
RUN_NAME=${1}_$(date +%Y-%m-%d-%H) | ||
OUTPUT_PATH=${2} | ||
DATASET_PATH=${3} | ||
export TPU_PREMAPPED_BUFFER_SIZE=20000014336 | ||
export TPU_PREMAPPED_BUFFER_TRANSFER_THRESHOLD_BYTES=20000014336 | ||
|
||
# Train and save checkpoint | ||
python3 MaxText/train.py MaxText/configs/base.yml remat_policy=full base_output_directory=$OUTPUT_PATH dataset_path=$DATASET_PATH \ | ||
steps=100 enable_emergency_checkpoint=true checkpoint_period=200 local_checkpoint_directory=/local local_checkpoint_period=20 run_name=$RUN_NAME metrics_file='saved_metrics.txt' | ||
|
||
# Retrieve checkpoint | ||
python3 MaxText/train.py MaxText/configs/base.yml remat_policy=full base_output_directory=$OUTPUT_PATH dataset_path=$DATASET_PATH \ | ||
steps=110 enable_emergency_checkpoint=true checkpoint_period=200 local_checkpoint_directory=/local local_checkpoint_period=20 run_name=$RUN_NAME metrics_file='restored_metrics.txt' | ||
|
||
|
||
python3 end_to_end/tpu/eval_assert.py checkpoint_save_restore metrics.txt learning/loss |