From cdb88dc4a9a4d61fef95c9a29b41145e8eb3e1b5 Mon Sep 17 00:00:00 2001 From: Huanyu He Date: Thu, 20 Feb 2025 09:27:15 -0800 Subject: [PATCH] fix upload-artifact v4 issue in build dynamic embedding wheel (#2754) Summary: # context * TorchRec's OSS workflow "build dynamic embedding wheels" has been [failing](https://github.com/pytorch/torchrec/actions/runs/13416363464/job/37478091546) due to an upgrading of upload action [bug report](https://github.com/actions/upload-artifact/issues/506) * we saw similar error message as below ``` Run actions/upload-artifact@v4 With the provided path, there will be 1 file uploaded Artifact name is valid! Root directory input is valid! Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run ``` # solution * as described in this [migration.md](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md), adding additional job (merge) the artifacts. Differential Revision: D69904715 --- .github/workflows/build_dynamic_embedding_wheels.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build_dynamic_embedding_wheels.yml b/.github/workflows/build_dynamic_embedding_wheels.yml index a3d32d278..da8174812 100644 --- a/.github/workflows/build_dynamic_embedding_wheels.yml +++ b/.github/workflows/build_dynamic_embedding_wheels.yml @@ -57,4 +57,15 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: + name: artifact-${{ matrix.os }}-${{ matrix.pyver }}-cu${{ matrix.cuver }} path: wheelhouse/*.whl + + merge: + runs-on: ubuntu-latest + needs: build_wheels + steps: + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: artifact + pattern: artifact-*