MCPcopy Index your code
hub / github.com/huggingface/alignment-handbook / test_loading_data_dict

Method test_loading_data_dict

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

Source from the content-addressed store, hash-verified

38 self.assertEqual(len(datasets["test"]), 300)
39
40 def test_loading_data_dict(self):
41 dataset_mixer = {
42 "HuggingFaceH4/testing_alpaca_small": 0.5,
43 "HuggingFaceH4/testing_self_instruct_small": 0.3,
44 "HuggingFaceH4/testing_codealpaca_small": 0.2,
45 }
46 datasets = get_datasets(dataset_mixer, columns_to_keep=["prompt", "completion"])
47 self.assertEqual(len(datasets["train"]), 100)
48 self.assertEqual(len(datasets["test"]), 300)
49
50 def test_loading_with_unit_fractions(self):
51 dataset_mixer = {

Callers

nothing calls this directly

Calls 1

get_datasetsFunction · 0.90

Tested by

no test coverage detected