You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several test files under tests/unit/ make real network calls to HuggingFace Hub, causing flaky CI failures when HF is slow or unavailable (e.g., 504 Gateway Timeout).
Affected files
tests/unit/eval/test_text_classification.py — Every test instantiates TextDataset which calls datasets.load_dataset() to download GLUE/MRPC from HuggingFace Hub.
tests/unit/loader/test_hf_model_class_mapping.py — TestResolveTaskAndModelClass (9 tests) and TestConflictScenarios (5 tests) call AutoConfig.from_pretrained() which downloads model configs from HuggingFace Hub. These were missed in Move misplaced integration/e2e tests out of tests/unit/ #95 which moved the TestHFModelClassMappingE2E class but left the AutoConfig.from_pretrained() callers behind.
Impact
Unit tests should be fast, deterministic, and offline
Network failures cause spurious test failures (observed: HfHubHTTPError: 504 Server Error)
Slows down the unit test suite unnecessarily
Fix
Move these tests to tests/integration/ where network-dependent tests belong.
Problem
Several test files under
tests/unit/make real network calls to HuggingFace Hub, causing flaky CI failures when HF is slow or unavailable (e.g., 504 Gateway Timeout).Affected files
tests/unit/eval/test_text_classification.py— Every test instantiatesTextDatasetwhich callsdatasets.load_dataset()to download GLUE/MRPC from HuggingFace Hub.tests/unit/loader/test_hf_model_class_mapping.py—TestResolveTaskAndModelClass(9 tests) andTestConflictScenarios(5 tests) callAutoConfig.from_pretrained()which downloads model configs from HuggingFace Hub. These were missed in Move misplaced integration/e2e tests out of tests/unit/ #95 which moved theTestHFModelClassMappingE2Eclass but left theAutoConfig.from_pretrained()callers behind.Impact
HfHubHTTPError: 504 Server Error)Fix
Move these tests to
tests/integration/where network-dependent tests belong.