Skip to content
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

Merged
merged 2 commits into from
Jul 11, 2023
Merged

fix vicuna example #2173

merged 2 commits into from
Jul 11, 2023

Conversation

infwinston
Copy link
Member

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

Copy link
Collaborator

@Michaelvll Michaelvll left a 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.

Comment on lines +13 to +27
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
Copy link
Collaborator

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?

Copy link
Collaborator

@Michaelvll Michaelvll left a 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. : )

@infwinston
Copy link
Member Author

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.

@infwinston infwinston merged commit ea41c5e into master Jul 11, 2023
15 checks passed
@infwinston infwinston deleted the fix-vicuna-example branch July 11, 2023 05:58
@infwinston infwinston restored the fix-vicuna-example branch July 11, 2023 05:58
@infwinston infwinston deleted the fix-vicuna-example branch July 11, 2023 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants