MCPcopy Create free account
hub / github.com/SalesforceAIResearch/perfcodegen / collect_errors

Method collect_errors

src/model.py:71–83  ·  view source on GitHub ↗
(self, batch_id)

Source from the content-addressed store, hash-verified

69 return outputs
70
71 def collect_errors(self, batch_id):
72 response = self.client.batches.retrieve(batch_id)
73 if response.status != "completed":
74 raise ValueError("The batch is not completed and its status is {}.".format(response.status))
75 error_file = response.error_file_id
76 if error_file == None:
77 return []
78 content = self.client.files.content(error_file)
79 contents = content.content.splitlines()
80 outputs = []
81 for line in contents:
82 outputs.append(json.loads(line))
83 return outputs
84
85 def batch_run(self, file_id):
86 response = self.client.batches.create(

Callers 1

download_fileFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected