From d54da2a5d7fb2024586127ddbbd3fbce6ca469c5 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Tue, 31 Oct 2023 00:30:36 -0700 Subject: [PATCH] try patching cpu count for test --- tests/test_hf_conversion_script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_hf_conversion_script.py b/tests/test_hf_conversion_script.py index d2f203d3a0..d2c2a9e1c9 100644 --- a/tests/test_hf_conversion_script.py +++ b/tests/test_hf_conversion_script.py @@ -5,7 +5,7 @@ import os import pathlib import sys -from unittest.mock import MagicMock +from unittest.mock import MagicMock, patch from composer import Trainer from composer.loggers import MLFlowLogger @@ -254,6 +254,7 @@ def test_callback_inits_with_defaults(): @pytest.mark.parametrize( 'hf_save_interval,save_interval,max_duration,expected_hf_checkpoints,expected_normal_checkpoints', [('3ba', '2ba', '7ba', 3, 4), ('1dur', '2ba', '1ep', 1, 4)]) +@patch('os.cpu_count', MagicMock(return_value=None)) def test_huggingface_conversion_callback(model: str, tmp_path: pathlib.Path, fsdp_state_dict_type: Optional[str], log_to_mlflow: bool,