Skip to content

Commit

Permalink
fix: 5322 bug pythondeployment fix failing integration tests import e…
Browse files Browse the repository at this point in the history
…xport (#5323)

# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->
Hub integration tests are sometimes a bid flaky due to IO errors.
Closes #5322 

**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->

- Bug fix (non-breaking change which fixes an issue)

**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->
NA

**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->

- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
  • Loading branch information
davidberenstein1957 authored Jul 29, 2024
1 parent 3b91292 commit 7d5a377
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion argilla/tests/integration/test_export_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

import argilla as rg
import pytest
from huggingface_hub.utils._errors import BadRequestError, FileMetadataError, HfHubHTTPError

_RETRIES = 5


@pytest.fixture
Expand Down Expand Up @@ -71,7 +74,7 @@ def token():
return os.getenv("HF_TOKEN_ARGILLA_INTERNAL_TESTING")


@pytest.mark.flaky(retries=3, only_on=[OSError]) # I/O error hub consistency CICD pipline
@pytest.mark.flaky(retries=_RETRIES, only_on=[OSError]) # I/O consistency CICD pipline
@pytest.mark.parametrize("with_records_export", [True, False])
class TestDiskImportExportMixin:
def test_export_dataset_to_disk(
Expand Down Expand Up @@ -135,6 +138,9 @@ def test_import_dataset_from_disk(
assert new_dataset.settings.questions[0].name == "label"


@pytest.mark.flaky(
retries=_RETRIES, only_on=[BadRequestError, FileMetadataError, HfHubHTTPError]
) # Hub consistency CICD pipline
@pytest.mark.skipif(
not os.getenv("HF_TOKEN_ARGILLA_INTERNAL_TESTING"),
reason="You are missing a token to write to `argilla-internal-testing` org on the Hugging Face Hub",
Expand Down

0 comments on commit 7d5a377

Please sign in to comment.