Skip to content

Commit

Permalink
chore: add retry commit model (#59)
Browse files Browse the repository at this point in the history
Co-authored-by: Hien To <[email protected]>
  • Loading branch information
hiento09 and hiento09 authored Nov 22, 2024
1 parent a294322 commit 7b44a08
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/convert-model-all-quant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,26 @@ jobs:
run: |
echo "SOURCE_MODEL_ID: ${{ env.SOURCE_MODEL_ID }}"
echo "MODEL_NAME: ${{ env.MODEL_NAME }}"
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "/mnt/models/${{ env.MODEL_NAME }}/hf"
# - name: Check file existence
# id: check_files
# uses: andstor/file-existence-action@v1
# with:
# files: "/mnt/models/${{ env.MODEL_NAME }}/hf"


- name: Prepare folders
if: steps.check_files.outputs.files_exists == 'false'
# if: steps.check_files.outputs.files_exists == 'false'
run: |
mkdir -p /mnt/models/${{ env.MODEL_NAME }}/hf
mkdir -p /mnt/models/.cache
- name: Download Hugging Face model
id: download_hf
if: steps.check_files.outputs.files_exists == 'false'
run: |
huggingface-cli login --token ${{ secrets.HUGGINGFACE_TOKEN_READ }} --add-to-git-credential
huggingface-cli download --repo-type model --local-dir /mnt/models/${{ env.MODEL_NAME }}/hf ${{ env.SOURCE_MODEL_ID }}
huggingface-cli logout
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
command: HF_HUB_ETAG_TIMEOUT=500 huggingface-cli download --repo-type model --local-dir /mnt/models/${{ env.MODEL_NAME }}/hf --cache-dir /mnt/models/.cache --token ${{ secrets.HUGGINGFACE_TOKEN_READ }} ${{ env.SOURCE_MODEL_ID }}

- name: Build lib for quantize
run: |
Expand Down

0 comments on commit 7b44a08

Please sign in to comment.