MCPcopy Create free account
hub / github.com/Tencent/digitalhuman / load

Method load

HATE/basic_hate/dataloader/browsecomp.py:11–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9 super().__init__(path)
10
11 def load(self):
12 num = 0
13 with open(self.path, 'r') as f:
14 for line in f:
15 num += 1
16 data = json.loads(line)
17 self.examples.append(
18 {
19 'input': data['query'],
20 'answer': data['answer']
21 }
22 )
23 if num == 100:
24 break
25 # with open(self.path, mode='r', newline='') as file:
26 # csv_reader = csv.reader(file)

Callers 9

load_dataFunction · 0.45
inference_from_resumeMethod · 0.45
load_cacheMethod · 0.45
load_audio_fileMethod · 0.45
load_promptFunction · 0.45
__init__Method · 0.45
evaluate_from_filesMethod · 0.45
__init__Method · 0.45

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected