Low-level API to the executor. Return a "future" GenerationResult which can be waited. Forwards the request to the workers through RPC.
(self, request: "GenerationRequest")
| 229 | return await asyncio.gather(*refs) |
| 230 | |
| 231 | def submit(self, request: "GenerationRequest") -> "GenerationResult": |
| 232 | """ |
| 233 | Low-level API to the executor. Return a "future" GenerationResult |
| 234 | which can be waited. Forwards the request to the workers through RPC. |
| 235 | """ |
| 236 | request.set_id(self._get_next_client_id()) |
| 237 | logprob_params = self._get_logprob_params(request) |
| 238 | |
| 239 | with nvtx_range_debug("rpc_submit"): |
| 240 | self.rpc_client.submit(request).remote(need_response=False) |
| 241 | |
| 242 | result = GenerationResult( |
| 243 | request, |
| 244 | background_error_handler=self._handle_background_error, |
| 245 | executor=self, |
| 246 | disaggregated_params=request.disaggregated_params, |
| 247 | logprob_params=logprob_params) |
| 248 | self._results[request.id] = result |
| 249 | |
| 250 | return result |
| 251 | |
| 252 | def start(self): |
| 253 | pass |
nothing calls this directly
no test coverage detected