class_docstr: Light-weight class for holding info to make the inference request.
  
  Attributes:
    inference_address: An address (such as "hostname:port") to send inference
      requests to.
    model_name: The Servo model name.
    model_type: One of ['classification', 'regression'].
    model_version: The version number of the model as a string. If set to an
      empty string, the latest model will be used.
    signature: The signature of the model to infer. If set to an empty string,
      the default signuature will be used.
    use_predict: If true then use the servo Predict API as opposed to
      Classification or Regression.
    predict_input_tensor: The name of the input tensor to parse when using the
      Predict API.
    predict_output_tensor: The name of the output tensor to parse when using the
      Predict API.
    estimator: An estimator to use instead of calling an external model.
    feature_spec: A feature spec for use with the estimator.
    custom_predict_fn: A custom prediction function.
  
  Raises:
    ValueError: If ServingBundle fails init validation.
class_docstr_tok: ["Light-weight","class","for","holding","info","to","make","the","inference","request",".","Attributes",":","inference_address",":","An","address","(","such","as","``","hostname",":","port","''",")","to","send","inference","requests","to",".","model_name",":","The","Servo","model","name",".","model_type",":","One","of","[","'classification","'",",","'regression","'","]",".","model_version",":","The","version","number","of","the","model","as","a","string",".","If","set","to","an","empty","string",",","the","latest","model","will","be","used",".","signature",":","The","signature","of","the","model","to","infer",".","If","set","to","an","empty","string",",","the","default","signuature","will","be","used",".","use_predict",":","If","true","then","use","the","servo","Predict","API","as","opposed","to","Classification","or","Regression",".","predict_input_tensor",":","The","name","of","the","input","tensor","to","parse","when","using","the","Predict","API",".","predict_output_tensor",":","The","name","of","the","output","tensor","to","parse","when","using","the","Predict","API",".","estimator",":","An","estimator","to","use","instead","of","calling","an","external","model",".","feature_spec",":","A","feature","spec","for","use","with","the","estimator",".","custom_predict_fn",":","A","custom","prediction","function",".","Raises",":","ValueError",":","If","ServingBundle","fails","init","validation","."]
docstr: Inits ServingBundle.
docstr_tok: ["Inits","ServingBundle","."]
code: def __init__(
      self,
      inference_address,
      model_name,
      model_type,
      model_version,
      signature,
      use_predict,
      predict_input_tensor,
      predict_output_tensor,
      estimator=None,
      feature_spec=None,
      custom_predict_fn=None,
  ):
      """Inits ServingBundle."""
      if not isinstance(inference_address, string_types):
          raise ValueError(
              "Invalid inference_address has type: {}".format(
                  type(inference_address)
              )
          )
      # Clean the inference_address so that SmartStub likes it.
      self.inference_address = inference_address.replace(
          "http://", ""
      ).replace("https://", "")
  
      if not isinstance(model_name, string_types):
          raise ValueError(
              "Invalid model_name has type: {}".format(type(model_name))
          )
      self.model_name = model_name
  
      if model_type not in ["classification", "regression"]:
          raise ValueError("Invalid model_type: {}".format(model_type))
      self.model_type = model_type
  
      self.model_version = int(model_version) if model_version else None
  
      self.signature = signature if signature else None
  
      self.use_predict = use_predict
      self.predict_input_tensor = predict_input_tensor
      self.predict_output_tensor = predict_output_tensor
      self.estimator = estimator
      self.feature_spec = feature_spec
      self.custom_predict_fn = custom_predict_fn
  
imports: from __future__ import division
  from __future__ import print_function
  import collections
  import copy
  import json
  import math
  from absl import logging
  import numpy
  import tensorflow
  from google.protobuf import json_format
  from six import binary_type, string_types, integer_types
  from six import iteritems
  from six.moves import zip
  from inspect import signature
  from utils import common_utils
  from utils import platform_utils
  from tensorflow_serving.apis import classification_pb2
  from tensorflow_serving.apis import inference_pb2
  from tensorflow_serving.apis import regression_pb2
label_desc: Use image node_id 1 to create a new ServingBundle object from inherited base classes: object with example: obj = ServingBundle(inference_address, model_name, model_type, model_version, signature, use_predict, predict_input_tensor, predict_output_tensor, estimator, feature_spec, custom_predict_fn)