Skip to content

Commit

Permalink
Merge branch 'ko3n1g/ci/fix-env-export' into 'main'
Browse files Browse the repository at this point in the history
tests: Fix ENV export

See merge request ADLR/megatron-lm!2189
  • Loading branch information
ko3n1g committed Oct 7, 2024
2 parents ff5cee9 + a559ec1 commit 3f90b98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functional_tests/shell_test_utils/_run_training.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ mv $TRAINING_PARAMS_PATH.tmp $TRAINING_PARAMS_PATH

# Pull env vars to export
ENV_VARS=$(yq '... comments="" | .ENV_VARS | to_entries | .[] | [.key + "=" + .value] | join(" ")' $TRAINING_PARAMS_PATH)
for ARGUMENT in $ENV_VARS; do
while IFS= read -r ARGUMENT; do
KEY=$(echo $ARGUMENT | cut -f1 -d=)

KEY_LENGTH=${#KEY}
VALUE="${ARGUMENT:$KEY_LENGTH+1}"

export "$KEY"="$VALUE"
echo "$KEY=$VALUE"
done
done <<< "$ENV_VARS"

# Run before script
SCRIPT=$(cat $TRAINING_PARAMS_PATH | yq '.BEFORE_SCRIPT')
Expand Down

0 comments on commit 3f90b98

Please sign in to comment.