Skip to content

Commit 44a6723

Browse files
committed
Add backwards compatibility for config variable names
1 parent 38e318c commit 44a6723

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

moe_pretraining/nemo/run_deepseek_v3_671b.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ cd $(dirname $0)
1919

2020
set -e
2121

22-
# Vars without defaults
22+
# Vars without defaults (support both old and new variable names for backwards compatibility)
2323
# Slurm settings
2424
: "${ACCOUNT:?ACCOUNT not set}"
2525
: "${PARTITION:?PARTITION not set}"
2626

2727
# Job settings
28-
: "${LOG_DIR:?LOG_DIR not set}"
28+
LOG_DIR="${LOG_DIR:-${JOB_DIR:?LOG_DIR or JOB_DIR not set}}"
2929
: "${IMAGE:?IMAGE not set}"
3030

3131
# Dataset settings
32-
: "${DATA_DIR:?DATA_DIR not set}"
32+
DATA_DIR="${DATA_DIR:-${DATADIR:-${PREPROCESSED_PATH:?DATA_DIR, DATADIR, or PREPROCESSED_PATH not set}}}"
3333
: "${MODEL_CKPT:?MODEL_CKPT not set}"
3434

3535
# Vars with defaults
@@ -63,7 +63,7 @@ set -e
6363
# Training settings
6464
: "${MAX_STEPS:=1000}"
6565
: "${WARMUP_STEPS:=0}"
66-
: "${LR:="2e-4"}"
66+
LR="${LR:-${MAX_LR:-"2e-4"}}"
6767
: "${MIN_LR:="5e-6"}"
6868
: "${SEED:=1234}"
6969

0 commit comments

Comments
 (0)