diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 427f75250..8602c20c0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,7 +18,9 @@ env: PYTHON_VERSION: "3.9" OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} HATCH_VERSION: "1.14.1" - HF_API_TOKEN: ${{ secrets.HUGGINGFACE_API_KEY }} + # we use HF_TOKEN instead of HF_API_TOKEN to work around a Hugging Face bug + # see https://github.com/deepset-ai/haystack/issues/9552 + HF_TOKEN: ${{ secrets.HUGGINGFACE_API_KEY }} jobs: run: diff --git a/e2e/pipelines/test_named_entity_extractor.py b/e2e/pipelines/test_named_entity_extractor.py index bade77404..26d36ffa0 100644 --- a/e2e/pipelines/test_named_entity_extractor.py +++ b/e2e/pipelines/test_named_entity_extractor.py @@ -68,8 +68,8 @@ def test_ner_extractor_hf_backend(raw_texts, hf_annotations, batch_size): @pytest.mark.parametrize("batch_size", [1, 3]) @pytest.mark.skipif( - not os.environ.get("HF_API_TOKEN", None), - reason="Export an env var called HF_API_TOKEN containing the Hugging Face token to run this test.", + not os.environ.get("HF_API_TOKEN", None) and not os.environ.get("HF_TOKEN", None), + reason="Export an env var called HF_API_TOKEN or HF_TOKEN containing the Hugging Face token to run this test.", ) def test_ner_extractor_hf_backend_private_models(raw_texts, hf_annotations, batch_size): extractor = NamedEntityExtractor(backend=NamedEntityExtractorBackend.HUGGING_FACE, model="deepset/bert-base-NER")