PyTritonClientTimeoutError


PyTritonClientTimeoutError Traceback (most recent call last)
Cell In[3], line 2
1 # obraining the hidded state representations for input SMILES
----> 2 hidden_states, pad_masks = connection.seqs_to_hidden(smis)

File /workspace/bionemo/bionemo/triton/inference_wrapper.py:54, in InferenceWrapper.seqs_to_hidden(self, seqs)
53 def seqs_to_hidden(self, seqs: List[str]) → Tuple[torch.Tensor, torch.Tensor]:
—> 54 result = send_seqs_for_inference(self.hiddens_client, SEQUENCES, seqs)
55 if HIDDENS not in result:
56 raise ValueError(f"Expecting {HIDDENS} but only found {result.keys()=}")

File /workspace/bionemo/bionemo/triton/client_encode.py:33, in send_seqs_for_inference(client, input_name, seqs)
31 # sequences = np.char.encode(np.array([[s] for s in seqs]), encoding=‘utf-8’)
32 sequences = encode_str_batch(seqs)
—> 33 result_dict = client.infer_batch(**{input_name: sequences})
34 return result_dict

File /usr/local/lib/python3.10/dist-packages/pytriton/client/client.py:513, in ModelClient.infer_batch(self, parameters, headers, *inputs, **named_inputs)
510 _verify_parameters(parameters)
511 _verify_parameters(headers)
→ 513 if not self.is_batching_supported:
514 raise PyTritonClientModelDoesntSupportBatchingError(
515 f"Model {self.model_config.model_name} doesn’t support batching - use infer_sample method instead"
516 )
518 return self._infer(inputs or named_inputs, parameters, headers)

File /usr/local/lib/python3.10/dist-packages/pytriton/client/client.py:372, in ModelClient.is_batching_supported(self)
366 @property
367 def is_batching_supported(self):
368 “”“Checks if model supports batching.
369
370 Also waits for server to get into readiness state.
371 “””
→ 372 return self.model_config.max_batch_size > 0

File /usr/local/lib/python3.10/dist-packages/pytriton/client/client.py:405, in ModelClient.model_config(self)
402 if self._general_client is None:
403 raise PyTritonClientClosedError(“ModelClient is closed”)
→ 405 self._model_config = get_model_config(
406 self._general_client, self._model_name, self._model_version, timeout_s=self._init_timeout_s
407 )
408 return self._model_config

File /usr/local/lib/python3.10/dist-packages/pytriton/client/utils.py:167, in get_model_config(client, model_name, model_version, timeout_s)
135 def get_model_config(
136 client: _TritonSyncClientType,
137 model_name: str,
138 model_version: Optional[str] = None,
139 timeout_s: Optional[float] = None,
140 ):
141 “”“Obtain configuration of model deployed on the Triton Inference Server.
142
143 Function waits for server readiness.
(…)
165 PyTritonClientModelUnavailableError: If model with given name (and version) is unavailable.
166 “””
→ 167 wait_for_model_ready(client, model_name=model_name, model_version=model_version, timeout_s=timeout_s)
169 model_version = model_version or “”
171 _LOGGER.debug(f"Obtaining model {model_name} config")

File /usr/local/lib/python3.10/dist-packages/pytriton/client/utils.py:267, in wait_for_model_ready(client, model_name, model_version, timeout_s)
264 timeout_s = timeout_s if timeout_s is not None else _DEFAULT_WAIT_FOR_MODEL_TIMEOUT_S
265 should_finish_before_s = time.time() + timeout_s
→ 267 wait_for_server_ready(client, timeout_s=timeout_s)
268 timeout_s = max(0.0, should_finish_before_s - time.time())
269 _LOGGER.debug(f"Waiting for model {model_name}/{model_version_msg} to be ready (timeout={timeout_s})")

File /usr/local/lib/python3.10/dist-packages/pytriton/client/utils.py:239, in wait_for_server_ready(client, timeout_s)
237 is_server_ready = _is_server_ready()
238 if not is_server_ready and time.time() >= should_finish_before_s:
→ 239 raise PyTritonClientTimeoutError(“Waiting for server to be ready timed out.”)

PyTritonClientTimeoutError: Waiting for server to be ready timed out.