File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 6161
6262 - name : Load constants into environment variables
6363 id : load_constants
64+ # "E_" is appended as suffix to every constant, to protect overwriting other sys env variables with same name
6465 run : |
6566 constants=$(cat constants.json)
66- echo "$constants" | jq -r 'to_entries|map("export \(.key)=\(.value|tostring)")|.[]' >> $GITHUB_ENV
67+ echo "$constants" | jq -r 'to_entries|map("E_ \(.key)=\(.value|tostring)")|.[]' >> $GITHUB_ENV
6768
6869 - name : Print all environment variables
6970 run : printenv
@@ -81,19 +82,19 @@ jobs:
8182 exp_mask_token_index="1"
8283
8384 # Verify constants match expected values
84- if [ "$EMBEDDING_OFFSET " != "$exp_embedding_offset" ]; then
85+ if [ "$E_EMBEDDING_OFFSET " != "$exp_embedding_offset" ]; then
8586 echo "EMBEDDING_OFFSET ($EMBEDDING_OFFSET) does not match expected value ($exp_embedding_offset)!"
8687 exit 1
8788 fi
88- if [ "$CLS_TOKEN " != "$exp_cls_token" ]; then
89+ if [ "$E_CLS_TOKEN " != "$exp_cls_token" ]; then
8990 echo "CLS_TOKEN ($CLS_TOKEN) does not match expected value ($exp_cls_token)!"
9091 exit 1
9192 fi
92- if [ "$PADDING_TOKEN_INDEX " != "$exp_padding_token_index" ]; then
93+ if [ "$E_PADDING_TOKEN_INDEX " != "$exp_padding_token_index" ]; then
9394 echo "PADDING_TOKEN_INDEX ($PADDING_TOKEN_INDEX) does not match expected value ($exp_padding_token_index)!"
9495 exit 1
9596 fi
96- if [ "$MASK_TOKEN_INDEX " != "$exp_mask_token_index" ]; then
97+ if [ "$E_MASK_TOKEN_INDEX " != "$exp_mask_token_index" ]; then
9798 echo "MASK_TOKEN_INDEX ($MASK_TOKEN_INDEX) does not match expected value ($exp_mask_token_index)!"
9899 exit 1
99100 fi
You can’t perform that action at this time.
0 commit comments