-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix vicuna example #2173
fix vicuna example #2173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the fix @infwinston! Left a question.
if [ "${local_last_ckpt}" != "${remote_last_ckpt}" ]; then | ||
mkdir -p ${remote_path}/${local_last_ckpt} | ||
gsutil -m rsync -r ${local_path}/${local_last_ckpt}/ ${remote_path}/${local_last_ckpt} | ||
|
||
# Keep only the last MAX_NUM_CKPT checkpoints | ||
num_local_ckpt=$(ls ${local_path} | grep checkpoint- | wc -l) | ||
echo "num_local_ckpt: ${num_local_ckpt}" | ||
if [ ${num_local_ckpt} -gt $MAX_NUM_CKPT ]; then | ||
for ckpt in $(ls ${local_path} | grep checkpoint- | grep -E '[0-9]+' | sort -t'-' -k1,1 -k2,2n | head -n-${MAX_NUM_CKPT}); do | ||
rm -rf ${local_path}/${ckpt} | ||
done | ||
fi | ||
fi | ||
|
||
sleep 600 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we upload the whole local directories anyway or do you think we still need this uploading last checkpoint logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be fine to let this PR in first to unlock any potential users, and fix the comment above later. : )
Sorry I didn't get time to further improve this. Let's fix it first and hopefully we have a more robust sync mode by @landscapepainter's #2190. |
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh