From d6949ef99248019dae844674a2d24215f62a850c Mon Sep 17 00:00:00 2001 From: elronbandel Date: Sun, 9 Feb 2025 17:54:29 +0200 Subject: [PATCH] fix: update cache action version and refine test_card invocation for specific conditions Signed-off-by: elronbandel --- .github/workflows/catalog_preparation.yml | 6 ++++-- prepare/cards/cohere_for_ai.py | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/catalog_preparation.yml b/.github/workflows/catalog_preparation.yml index a2decf374f..05a75d93d0 100644 --- a/.github/workflows/catalog_preparation.yml +++ b/.github/workflows/catalog_preparation.yml @@ -35,10 +35,12 @@ jobs: python-version: '3.9' - name: Cache Hugging Face Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/huggingface - key: huggingface-cache + key: huggingface-cache-${{ github.run_id }} + restore-keys: | + huggingface-cache - run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install --system ".[tests]" diff --git a/prepare/cards/cohere_for_ai.py b/prepare/cards/cohere_for_ai.py index c906aa04f6..38f96993c6 100644 --- a/prepare/cards/cohere_for_ai.py +++ b/prepare/cards/cohere_for_ai.py @@ -158,13 +158,13 @@ "2. machine-translations of handpicked examples into 101 languages →… See the full description on the dataset page: https://huggingface.co/datasets/CohereForAI/aya_evaluation_suite." ), ) - - test_card( - card, - metrics=["metrics.rag.correctness.llama_index_by_mock"], - debug=False, - strict=False, - ) + if subset == "aya_human_annotated" and lang == "eng": + test_card( + card, + metrics=["metrics.rag.correctness.llama_index_by_mock"], + debug=False, + strict=False, + ) add_to_catalog( card, f"cards.cohere_for_ai.{subset}.{lang}",