Skip to content

Commit 7632427

Browse files
Pipeline failure fixes
1 parent 18df07b commit 7632427

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

superbench/benchmarks/micro_benchmarks/huggingface_model_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _get_model_size(self, model: PreTrainedModel) -> float:
247247
Returns:
248248
Number of parameters in millions.
249249
"""
250-
return sum(p.numel() for p in model.parameters()) / 1_000_000
250+
return float(sum(p.numel() for p in model.parameters())) / 1_000_000
251251

252252
@staticmethod
253253
def estimate_param_count_from_config(hf_config) -> Optional[int]:

tests/benchmarks/micro_benchmarks/test_huggingface_e2e.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"""End-to-end integration tests for HuggingFace model loading.
55
66
These tests actually download and load models from HuggingFace Hub.
7-
Skipped when SB_TEST_CUDA=0.
7+
The test class is skipped according to ``@decorator.cuda_test``, and
8+
``test_load_model_to_gpu`` is additionally skipped when
9+
``torch.cuda.is_available()`` is false.
810
"""
911

1012
import pytest

0 commit comments

Comments
 (0)