MCPcopy Create free account
hub / github.com/alibaba/GraphScope / parse_runstep_responses

Method parse_runstep_responses

python/graphscope/client/utils.py:118–136  ·  view source on GitHub ↗
(self, responses)

Source from the content-addressed store, hash-verified

116 yield item
117
118 def parse_runstep_responses(self, responses):
119 chunks = []
120 response_head = None
121 has_next = True
122 for response in responses:
123 if response.HasField("head"):
124 response_head = response
125 else:
126 if not chunks or not has_next:
127 chunks.append(response.body.chunk)
128 else:
129 chunks[-1] += response.body.chunk
130 has_next = response.body.has_next
131 cursor = 0
132 for op_result in response_head.head.results:
133 if op_result.meta.has_large_result:
134 op_result.result = chunks[cursor]
135 cursor += 1
136 return response_head.head
137
138
139def handle_grpc_error_with_retry(fn, retry=True):

Callers 1

_run_step_implMethod · 0.80

Calls 1

appendMethod · 0.65

Tested by

no test coverage detected