Skip to content

Commit

Permalink
Patch os cpu count to avoid extra multiprocessing inside pytest which…
Browse files Browse the repository at this point in the history
… sometimes hangs (#745)
  • Loading branch information
dakinggg authored Nov 17, 2023
1 parent e730995 commit 25bb63f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/fixtures/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

from pathlib import Path
from unittest.mock import MagicMock, patch

from composer.utils import dist
from omegaconf import DictConfig
Expand All @@ -25,6 +26,7 @@ def tiny_ft_dataset_path(tmp_path: Path, dataset_size: int = 4) -> Path:


@fixture
@patch('os.cpu_count', MagicMock(return_value=None))
def tiny_ft_dataloader(tiny_ft_dataset_path: Path,
mpt_tokenizer: PreTrainedTokenizerBase,
max_seq_len: int = 128,
Expand Down

0 comments on commit 25bb63f

Please sign in to comment.