class_docstr: Mixin class for SchemaBuilder that holds Triton specific methods
docstr: Update serializer and deserializer method for triton
  
  Update input_serializer, input_deserializer, output_serializer
  and output_deserializer to use Triton specific converter.
  This method is only meant to be called during ModelBuilder().build() for Triton.
docstr_tok: ["Update","serializer","and","deserializer","method","for","triton","Update","input_serializer",",","input_deserializer",",","output_serializer","and","output_deserializer","to","use","Triton","specific","converter",".","This","method","is","only","meant","to","be","called","during","ModelBuilder","(",")",".build","(",")","for","Triton","."]
code: def _update_serializer_deserializer_for_triton(self) -> None:
      """Update serializer and deserializer method for triton
  
      Update input_serializer, input_deserializer, output_serializer
      and output_deserializer to use Triton specific converter.
      This method is only meant to be called during ModelBuilder().build() for Triton.
      """
      # Update for input
      self._detect_class_of_sample_input_and_output()
      self.input_serializer = CLASS_TO_TRANSLATOR_MAP.get(
          self._input_class_name
      )()
      self.input_deserializer = CLASS_TO_TRANSLATOR_MAP.get(
          self._input_class_name
      )()
      self.output_serializer = CLASS_TO_TRANSLATOR_MAP.get(
          self._output_class_name
      )()
      self.output_deserializer = CLASS_TO_TRANSLATOR_MAP.get(
          self._output_class_name
      )()
  
      # Validate translation
      try:
          self._sample_input_ndarray = self.input_serializer.serialize(
              self.sample_input
          )
          self._sample_output_ndarray = (
              self.output_serializer.serialize(self.sample_output)
          )
          self.input_deserializer.deserialize(
              self._sample_input_ndarray
          )
          self.output_deserializer.deserialize(
              self._sample_output_ndarray
          )
  
      except Exception as e:
          raise ValueError(
              (
                  "Validation of serialization and deserialization failed: %s,"
                  "please verify your sample_input and sample_output."
              )
              % e
          )
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/builder/triton_schema_builder.py
imports: from __future__ import absolute_import
  from sagemaker.serve.marshalling.triton_translator import TorchTensorTranslator, TensorflowTensorTranslator, NumpyTranslator, ListTranslator
label_desc: Use image node_id 2 for calling the TritonSchemaBuilder obj's underlying member method code with example usage: obj._update_serializer_deserializer_for_triton() without return types