MCPcopy Create free account
hub / github.com/codefuse-ai/codefuse-devops-eval / ToolFillDataset

Class ToolFillDataset

src/datasets/toolfill_dataset.py:8–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class ToolFillDataset(ToolDataset):
9 def __init__(self, dataset_name, tool_task, filepath):
10 self.dataset_name = dataset_name
11 self.tool_task = tool_task
12 self.filepath = filepath
13 self.datas = self.load_data()
14
15 def load_data(self, ) -> list:
16 if self.filepath:
17 return self.load_data_from_local(self.filepath)
18 elif self.dataset_name and self.tool_task:
19 return self.load_data_from_hf(self.tool_task)
20 return []
21
22 def load_data_from_local(self, filepath):
23 if "jsonl" in filepath:
24 return read_jsonl_file(filepath)
25 elif "json" in filepath:
26 return read_json_file(filepath)
27 return []
28
29 def load_data_from_hf(self, tool_task):
30 pass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected