From 31aa7360be7f9e904615a5173980c87500da4166 Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 11:38:40 +0800 Subject: [PATCH 1/7] [CI] save & copy to local dir instead of using http --- .github/workflows/unit_tests.yml | 66 +++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ab23712b3..7e4296b91 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -199,6 +199,7 @@ jobs: volumes: - /dev/dri/by-path:/dev/dri/by-path - /home/ci/models/pyenv:/opt/pyenv + - /home/ci/models/dist:/opt/dist - /home/ci/models:/monster/data/model - /home/ci/models/huggingface:/github/home/.cache/huggingface @@ -276,7 +277,11 @@ jobs: - name: Upload source to local continue-on-error: true - run: curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=${{ env.SOURCE_HASH }}" -F "file=@dist/gptqmodel_source.tar.gz" http://$RUNNER/gpu/whl/upload + run: | +# curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=${{ env.SOURCE_HASH }}" -F "file=@dist/gptqmodel_source.tar.gz" http://$RUNNER/gpu/whl/upload + DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} + [ -d $DIR ] || mkdir -p $DIR + cp dist/gptqmodel_source.tar.gz $DIR/ - name: Upload source to github artifact uses: actions/upload-artifact@v5 @@ -318,7 +323,11 @@ jobs: run: | WHEEL="$(readlink -f dist/*.whl)" SHA256="$(sha256sum "$WHEEL" | awk '{print $1}')" - curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=$SHA256" -F "file=@${WHEEL};type=application/octet-stream" http://$RUNNER/gpu/whl/upload +# curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=$SHA256" -F "file=@${WHEEL};type=application/octet-stream" http://$RUNNER/gpu/whl/upload + + DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} + [ -d $DIR ] || mkdir -p $DIR + cp $WHEEL $DIR/ - name: Upload wheel to github artifact if: github.event.inputs.artifact_id == '' && !cancelled() @@ -345,6 +354,7 @@ jobs: - /home/ci/models:/monster/data/model - /home/ci/models/huggingface:/github/home/.cache/huggingface - /home/ci/models/pyenv:/opt/pyenv + - /home/ci/models/dist:/opt/dist strategy: fail-fast: false max-parallel: ${{ fromJson(needs.check-vm.outputs['max-parallel']).size || 20 }} @@ -413,14 +423,14 @@ jobs: # run: | # bash -c "$(curl -L http://${RUNNER}/scripts/env/init_compiler_no_env.sh)" @ ${{ needs.check-vm.outputs.cuda_version }} ${{ env.TORCH_VERSION }} $python_version - - name: Download source from local - continue-on-error: true - run: | - curl -s -O http://$RUNNER/whl/${{ env.repo }}/${{ github.run_id }}/gptqmodel_source.tar.gz - ls -ahl . - sha256=$(sha256sum $file_name) - echo "sha256=$sha256" - echo "SOURCE_DOWNLOADED=1" >> $GITHUB_ENV +# - name: Download source from local +# continue-on-error: true +# run: | +# curl -s -O http://$RUNNER/whl/${{ env.repo }}/${{ github.run_id }}/gptqmodel_source.tar.gz +# ls -ahl . +# sha256=$(sha256sum $file_name) +# echo "sha256=$sha256" +# echo "SOURCE_DOWNLOADED=1" >> $GITHUB_ENV # - name: Download source from github # if: env.SOURCE_DOWNLOADED == '' && !cancelled() @@ -440,19 +450,29 @@ jobs: - name: Download wheel from local continue-on-error: true run: | - file_name=$(curl -s -F "runid=${{ needs.check-vm.outputs.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "fuzz=1" "http://$RUNNER/gpu/whl/download") - - echo "file_name=$file_name" - - if echo "$file_name" | grep -q "gptqmodel"; then - mkdir dist || true - cd dist - curl -s -O http://$RUNNER/whl/${{ env.repo }}/${{ needs.check-vm.outputs.run_id }}/$file_name - ls -ahl . - sha256=$(sha256sum $file_name) - echo "sha256=$sha256" - echo "WHL_DOWNLOADED=1" >> $GITHUB_ENV - fi + DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} + [ -d $DIR ] || exit 1 + echo "WHL_DOWNLOADED=1" >> $GITHUB_ENV + + ls $DIR + + mkdir dist || true + + cp $DIR/*.whl dist/ + +# file_name=$(curl -s -F "runid=${{ needs.check-vm.outputs.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "fuzz=1" "http://$RUNNER/gpu/whl/download") + +# echo "file_name=$file_name" +# +# if echo "$file_name" | grep -q "gptqmodel"; then +# mkdir dist || true +# cd dist +# curl -s -O http://$RUNNER/whl/${{ env.repo }}/${{ needs.check-vm.outputs.run_id }}/$file_name +# ls -ahl . +# sha256=$(sha256sum $file_name) +# echo "sha256=$sha256" +# echo "WHL_DOWNLOADED=1" >> $GITHUB_ENV +# fi - name: Download artifact from github if: env.WHL_DOWNLOADED == '' && !cancelled() From f6bc02abc05337d6a8532d414373ad32b054fb5e Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 11:41:35 +0800 Subject: [PATCH 2/7] [CI] add empty line --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 7e4296b91..36a378bdb 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -275,6 +275,7 @@ jobs: echo "hash=$sha256" echo "SOURCE_HASH=$sha256" >> $GITHUB_ENV + - name: Upload source to local continue-on-error: true run: | From 1cd7fe376d1cff82656dbdb2993430ff8771e483 Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 11:44:55 +0800 Subject: [PATCH 3/7] [CI] disable Upload source to local --- .github/workflows/unit_tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 36a378bdb..601758edf 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -276,13 +276,13 @@ jobs: echo "SOURCE_HASH=$sha256" >> $GITHUB_ENV - - name: Upload source to local - continue-on-error: true - run: | -# curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=${{ env.SOURCE_HASH }}" -F "file=@dist/gptqmodel_source.tar.gz" http://$RUNNER/gpu/whl/upload - DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} - [ -d $DIR ] || mkdir -p $DIR - cp dist/gptqmodel_source.tar.gz $DIR/ +# - name: Upload source to local +# continue-on-error: true +# run: | +## curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=${{ env.SOURCE_HASH }}" -F "file=@dist/gptqmodel_source.tar.gz" http://$RUNNER/gpu/whl/upload +# DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} +# [ -d $DIR ] || mkdir -p $DIR +# cp dist/gptqmodel_source.tar.gz $DIR/ - name: Upload source to github artifact uses: actions/upload-artifact@v5 From 5f9420d4105ae1a846d03276c2a6bec18bb6afa2 Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 11:49:03 +0800 Subject: [PATCH 4/7] [CI] remove commented --- .github/workflows/unit_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 601758edf..e1645ecf2 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -324,7 +324,6 @@ jobs: run: | WHEEL="$(readlink -f dist/*.whl)" SHA256="$(sha256sum "$WHEEL" | awk '{print $1}')" -# curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=$SHA256" -F "file=@${WHEEL};type=application/octet-stream" http://$RUNNER/gpu/whl/upload DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} [ -d $DIR ] || mkdir -p $DIR From ad610935beceb15a1cd2be9ad40e28a9378be8f7 Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 11:51:33 +0800 Subject: [PATCH 5/7] [CI] uninstall gptqmodel first --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index e1645ecf2..7c2cfdc9e 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -484,6 +484,7 @@ jobs: - name: Install wheel run: | + uv pip uninstall gptqmodel uv pip install -U transformers tabulate if [ "${{ matrix.test_script }}" == "test_perplexity" ] || \ [ "${{ matrix.test_script }}" == "test_inference_speed" ] || \ From 554fa608b4b6646721a2e17278861686ffce95f7 Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 14:49:53 +0800 Subject: [PATCH 6/7] [CI] show detail --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 7c2cfdc9e..5568e5503 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -454,7 +454,7 @@ jobs: [ -d $DIR ] || exit 1 echo "WHL_DOWNLOADED=1" >> $GITHUB_ENV - ls $DIR + ls -ahl $DIR mkdir dist || true From f170eda08906fdcee91fff96ba4c2dd3379b0200 Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 14 Nov 2025 14:54:20 +0800 Subject: [PATCH 7/7] [CI] copy to local for release action --- .github/workflows/release.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 134a6e53c..aed9bc126 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -340,10 +340,11 @@ jobs: continue-on-error: true run: | sha256=$(sha256sum dist/${{ env.WHL_NAME }}) - response=$(curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=$sha256" -F "file=@dist/${{ env.WHL_NAME }}" http://${{ needs.check-vm.outputs.ip }}/gpu/whl/upload) - if [ "$response" -eq 0 ]; then - echo "UPLOADED=1" >> $GITHUB_ENV - fi + + DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} + [ -d $DIR ] || mkdir -p $DIR + cp dist/${{ env.WHL_NAME }} $DIR/ + echo "UPLOADED=1" >> $GITHUB_ENV - name: Upload artifact if: env.SHOULD_RUN == 1 @@ -422,10 +423,10 @@ jobs: continue-on-error: true run: | sha256=$(sha256sum dist/${{ env.WHL_NAME }}) - response=$(curl -s -F "runid=${{ github.run_id }}" -F "repo=${{ env.repo }}" -F "ref=${{ env.ref }}" -F "sha256=$sha256" -F "file=@dist/${{ env.WHL_NAME }}" http://${{ needs.check-vm.outputs.ip }}/gpu/whl/upload) - if [ "$response" -eq 0 ]; then - echo "UPLOADED=1" >> $GITHUB_ENV - fi + DIR=/opt/dist/${{ needs.check-vm.outputs.run_id }} + [ -d $DIR ] || mkdir -p $DIR + cp dist/${{ env.WHL_NAME }} $DIR/ + echo "UPLOADED=1" >> $GITHUB_ENV - name: Upload to artifact uses: actions/upload-artifact@v5