peacock-data-public-datasets-idc-bigscience / tools /fixing_checkpoints_for_from_pretrained.sh
applied-ai-018's picture
Add files using upload-large-folder tool
cf5659c verified
raw
history blame contribute delete
624 Bytes
my_callback () {
INDEX=${1}
BRANCH=${2}
if [[ $BRANCH == origin/global_step* ]];
then
git checkout "${BRANCH:7}"
git mv "${BRANCH:7}"/* .
cp ../gpt2_tokenizer/tokenizer.json .
git add tokenizer.json
git commit -m "fixed checkpoints to be from_pretrained-compatible"
git push
fi
}
get_branches () {
git branch --all --format='%(refname:short)'
}
# mapfile -t -C my_callback -c 1 BRANCHES < <( get_branches ) # if you want the branches that were sent to mapfile in a new array as well
# echo "${BRANCHES[@]}"
export GIT_LFS_SKIP_SMUDGE=1
mapfile -t -C my_callback -c 1 < <( get_branches )