MCPcopy Create free account
hub / github.com/Tele-AI/Telechat / TelechatDataset

Class TelechatDataset

deepspeed-telechat/utils/data/raw_datasets.py:29–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29class TelechatDataset(PromptRawDataset):
30
31 def __init__(self, output_path, seed, dataset_name):
32 super().__init__(output_path, seed, dataset_name)
33 self.dataset_name = dataset_name
34
35
36 def get_train_data(self):
37 dataset = self.raw_datasets["train"]
38 return dataset
39
40 def get_eval_data(self):
41 dataset = self.raw_datasets["train"]
42 return dataset
43
44 def get_prompt(self, sample):
45 return "<_user>" + sample['input'] + "<_bot>"
46
47 def get_prompt_and_answer(self, sample):
48 return "<_user>" + sample['input'] + "<_bot>" + sample['output'] + "<_end>"
49

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected