class_docstr: Plugin for understanding/debugging model inference.
    
class_docstr_tok: ["Plugin","for","understanding\/debugging","model","inference","."]
docstr: Returns JSON for the partial dependence plots for a feature.
  
  Args:
    request: A request that should contain 'feature_name', 'example_index',
       'inference_address', 'model_name', 'model_type', 'model_version', and
       'model_signature'.
  
  Returns:
    A list of JSON objects, one for each chart.
code: def _infer_mutants_handler(self, request):
      """Returns JSON for the partial dependence plots for a feature.
  
      Args:
        request: A request that should contain 'feature_name', 'example_index',
           'inference_address', 'model_name', 'model_type', 'model_version', and
           'model_signature'.
  
      Returns:
        A list of JSON objects, one for each chart.
      """
      try:
          if request.method != "GET":
              logger.error("%s requests are forbidden.", request.method)
              return http_util.Respond(
                  request,
                  "invalid non-GET request",
                  "application/json",
                  code=405,
              )
  
          example_index = int(request.args.get("example_index", "0"))
          feature_name = request.args.get("feature_name")
          (
              inference_addresses,
              model_names,
              model_versions,
              model_signatures,
          ) = self._parse_request_arguments(request)
          json_mapping = self._infer_mutants_impl(
              feature_name,
              example_index,
              inference_addresses,
              model_names,
              request.args.get("model_type"),
              model_versions,
              model_signatures,
              request.args.get("use_predict") == "true",
              request.args.get("predict_input_tensor"),
              request.args.get("predict_output_tensor"),
              request.args.get("x_min"),
              request.args.get("x_max"),
              request.args.get("feature_index_pattern"),
              custom_predict_fn=self.custom_predict_fn,
          )
          return http_util.Respond(
              request, json_mapping, "application/json"
          )
      except common_utils.InvalidUserInputError as e:
          return http_util.Respond(
              request, e.message, "application/json", code=400
          )
      except Exception as e:
          return http_util.Respond(
              request, str(e), "application/json", code=400
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import io
  import json
  import logging
  import math
  import numpy
  import os
  import werkzeug
  from werkzeug import wrappers
  from six.moves import xrange
  from google.protobuf import json_format
  from grpc.framework.interfaces.face.face import AbortionError
  from werkzeug import wrappers
  import tensorflow
  from tensorboard.backend import http_util
  from tensorboard.plugins import base_plugin
  from utils import common_utils
  from utils import inference_utils
  from utils import platform_utils
label_desc: Use image node_id 18 for calling the WhatIfToolPlugin obj's underlying member method code with example usage: obj._infer_mutants_handler(request) and returns: http_util, http_util, http_util, http_util