diff --git a/.github/workflows/catalog_preparation.yml b/.github/workflows/catalog_preparation.yml index 5ee3590d4..6f33786f5 100644 --- a/.github/workflows/catalog_preparation.yml +++ b/.github/workflows/catalog_preparation.yml @@ -9,7 +9,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }} cancel-in-progress: true - + jobs: preparation: @@ -35,8 +35,11 @@ jobs: - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install --system ".[tests]" - - run: huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} - + - name: Hugging Face Login + run: | + for i in {1..5}; do + huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} && break || sleep $((2 ** i)); + done - name: Run Tests run: | modulo="${{ matrix.modulo }}" diff --git a/.github/workflows/examples_tests.yml b/.github/workflows/examples_tests.yml index 8414eed65..3839faa4d 100644 --- a/.github/workflows/examples_tests.yml +++ b/.github/workflows/examples_tests.yml @@ -38,7 +38,12 @@ jobs: - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install --system ".[tests,watsonx,inference_tests]" - - run: huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} + + - name: Hugging Face Login + run: | + for i in {1..5}; do + huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} && break || sleep $((2 ** i)); + done - name: Run Tests run: python -m unittest discover -s tests/examples -p "test_*.py" \ No newline at end of file diff --git a/.github/workflows/inference_tests.yml b/.github/workflows/inference_tests.yml index 00d7125c8..d07c7f59d 100644 --- a/.github/workflows/inference_tests.yml +++ b/.github/workflows/inference_tests.yml @@ -41,7 +41,10 @@ jobs: - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install --system ".[tests,watsonx,inference-tests]" - - run: huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} - + - name: Hugging Face Login + run: | + for i in {1..5}; do + huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} && break || sleep $((2 ** i)); + done - name: Run Tests run: python -m unittest discover -s tests/inference -p "test_*.py" diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index db33a8cee..fa13fbd8d 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -33,8 +33,11 @@ jobs: uv pip install --system ".[tests,watsonx,inference-tests]" uv pip install --system litellm uv pip install --system diskcache - huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} - + - name: Hugging Face Login + run: | + for i in {1..5}; do + huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} && break || sleep $((2 ** i)); + done - name: Prepare the dirs for performance evaluation in main run: | mkdir -p performance_action