MCPcopy
hub / github.com/huggingface/alignment-handbook / test_loading_data_args

Method test_loading_data_args

tests/test_data.py:29–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 """Each of these test datasets has 100 examples"""
28
29 def test_loading_data_args(self):
30 dataset_mixer = {
31 "HuggingFaceH4/testing_alpaca_small": 0.5,
32 "HuggingFaceH4/testing_self_instruct_small": 0.3,
33 "HuggingFaceH4/testing_codealpaca_small": 0.2,
34 }
35 data_args = DataArguments(dataset_mixer=dataset_mixer)
36 datasets = get_datasets(data_args, columns_to_keep=["prompt", "completion"])
37 self.assertEqual(len(datasets["train"]), 100)
38 self.assertEqual(len(datasets["test"]), 300)
39
40 def test_loading_data_dict(self):
41 dataset_mixer = {

Callers

nothing calls this directly

Calls 2

DataArgumentsClass · 0.90
get_datasetsFunction · 0.90

Tested by

no test coverage detected