Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/unit/grain_data_processing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def _make_config(self, **overrides):
return pyconfig.initialize([sys.argv[0], get_test_config_path()], **kwargs)


@pytest.mark.cpu_only
class GrainArrayRecordProcessingTest(
_GrainArrayRecordSetup, GrainDeterminismMixin, GrainBaseProcessingTest, unittest.TestCase
):
Expand All @@ -201,6 +202,7 @@ def test_batch_determinism(self):
super().test_batch_determinism()


@pytest.mark.cpu_only
class GrainArrayRecordProcessingWithMultiSourceBlendingTest(
_GrainArrayRecordSetup, GrainBaseProcessingTest, unittest.TestCase
):
Expand All @@ -211,6 +213,7 @@ def setUp(self):
self.config = self._make_config(grain_train_files=train_files_weighted)


@pytest.mark.cpu_only
class GrainArrayRecordProcessingWithMixtureConfigTest(_GrainArrayRecordSetup, GrainBaseProcessingTest, unittest.TestCase):

def setUp(self):
Expand Down Expand Up @@ -270,6 +273,7 @@ def setUp(self):
self.config = self._make_config(grain_ram_budget_mb=512, grain_worker_count=-1) # Enable auto-tuning


@pytest.mark.cpu_only
class GrainArrayRecordTiktokenTest(_GrainArrayRecordSetup, GrainBaseProcessingTest, unittest.TestCase):
"""Test grain data processing with tiktoken tokenizer."""

Expand All @@ -281,6 +285,7 @@ def setUp(self):
)


@pytest.mark.cpu_only
class GrainArrayRecordHFTokenizerTest(_GrainArrayRecordSetup, GrainBaseProcessingTest, unittest.TestCase):
"""Test grain data processing with HuggingFace tokenizer."""

Expand All @@ -292,6 +297,7 @@ def setUp(self):
)


@pytest.mark.cpu_only
class GrainArrayRecordBestFitPackingTest(_GrainArrayRecordSetup, GrainBaseProcessingTest, unittest.TestCase):
"""Test grain data processing with best_fit packing strategy."""

Expand Down Expand Up @@ -381,6 +387,7 @@ def _make_config(self, **overrides):
return pyconfig.initialize([sys.argv[0], get_test_config_path()], **kwargs)


@pytest.mark.cpu_only
class GrainParquetProcessingTest(_GrainParquetSetup, GrainDeterminismMixin, GrainBaseProcessingTest, unittest.TestCase):
"""Test grain data processing with Parquet format.

Expand Down Expand Up @@ -519,6 +526,7 @@ def _make_config(self, **overrides):
return pyconfig.initialize([sys.argv[0], get_test_config_path()], **kwargs)


@pytest.mark.cpu_only
class GrainTFRecordProcessingTest(_GrainTFRecordSetup, GrainDeterminismMixin, GrainBaseProcessingTest, unittest.TestCase):
"""Test grain data processing with TFRecord format.

Expand All @@ -533,6 +541,7 @@ def setUpClass(cls):
super().setUpClass()


@pytest.mark.cpu_only
class GrainTFRecordPreTokenizedProcessingTest(_GrainTFRecordSetup, GrainBaseProcessingTest, unittest.TestCase):
"""Test grain data processing with a pre-tokenized TFRecord dataset (tokenize_train_data=False).

Expand Down
2 changes: 2 additions & 0 deletions tests/unit/hf_data_processing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import os.path

import jax
import pytest
from jax.sharding import Mesh
from jax.experimental import mesh_utils

Expand All @@ -30,6 +31,7 @@
from tests.utils.test_helpers import get_test_config_path, get_test_base_output_directory


@pytest.mark.cpu_only
class HfDataProcessingTest(unittest.TestCase):

def setUp(self):
Expand Down
1 change: 1 addition & 0 deletions tests/unit/tfds_data_processing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from tests.utils.test_helpers import get_test_config_path, get_test_base_output_directory


@pytest.mark.cpu_only
class TfdsDataProcessingTest(unittest.TestCase):

def setUp(self):
Expand Down
Loading