Skip to content

Commit

Permalink
try patching cpu count for test
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Oct 31, 2023
1 parent b4fc316 commit d54da2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_hf_conversion_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d54da2a

Please sign in to comment.