class_docstr: Updates the method name(s) of the SavedModel stored in the given path.
  
  The `MethodNameUpdater` class provides the functionality to update the method
  name field in the signature_defs of the given SavedModel. For example, it
  can be used to replace the `predict` `method_name` to `regress`.
  
  Typical usages of the `MethodNameUpdater`
  ```python
  ...
  updater = tf.compat.v1.saved_model.signature_def_utils.MethodNameUpdater(
      export_dir)
  # Update all signature_defs with key "foo" in all meta graph defs.
  updater.replace_method_name(signature_key="foo", method_name="regress")
  # Update a single signature_def with key "bar" in the meta graph def with
  # tags ["serve"]
  updater.replace_method_name(signature_key="bar", method_name="classify",
                              tags="serve")
  updater.save(new_export_dir)
  ```
  
  Note: This function will only be available through the v1 compatibility
  library as tf.compat.v1.saved_model.builder.MethodNameUpdater.
class_docstr_tok: ["Updates","the","method","name","(","s",")","of","the","SavedModel","stored","in","the","given","path",".","The","`","MethodNameUpdater","`","class","provides","the","functionality","to","update","the","method","name","field","in","the","signature_defs","of","the","given","SavedModel",".","For","example",",","it","can","be","used","to","replace","the","`","predict","`","`","method_name","`","to","`","regress","`",".","Typical","usages","of","the","`","MethodNameUpdater","`","``","`","python","...","updater","=","tf.compat.v1.saved_model.signature_def_utils.MethodNameUpdater","(","export_dir",")","#","Update","all","signature_defs","with","key","``","foo","''","in","all","meta","graph","defs",".","updater.replace_method_name","(","signature_key=","''","foo","''",",","method_name=","''","regress","''",")","#","Update","a","single","signature_def","with","key","``","bar","''","in","the","meta","graph","def","with","#","tags","[","``","serve","''","]","updater.replace_method_name","(","signature_key=","''","bar","''",",","method_name=","''","classify","''",",","tags=","''","serve","''",")","updater.save","(","new_export_dir",")","``","`","Note",":","This","function","will","only","be","available","through","the","v1","compatibility","library","as","tf.compat.v1.saved_model.builder.MethodNameUpdater","."]
docstr: Creates an MethodNameUpdater object.
  
  Args:
    export_dir: Directory containing the SavedModel files.
  
  Raises:
    IOError: If the saved model file does not exist, or cannot be successfully
    parsed.
docstr_tok: ["Creates","an","MethodNameUpdater","object",".","Args",":","export_dir",":","Directory","containing","the","SavedModel","files",".","Raises",":","IOError",":","If","the","saved","model","file","does","not","exist",",","or","can","not","be","successfully","parsed","."]
code: def __init__(self, export_dir):
      """Creates an MethodNameUpdater object.
  
      Args:
        export_dir: Directory containing the SavedModel files.
  
      Raises:
        IOError: If the saved model file does not exist, or cannot be successfully
        parsed.
      """
      self._export_dir = export_dir
      self._saved_model = loader.parse_saved_model(export_dir)
  
file_path: tensorflow/tensorflow/python/saved_model/method_name_updater.py
imports: from tensorflow.python.lib.io import file_io
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.saved_model import constants
  from tensorflow.python.saved_model import loader_impl
  from tensorflow.python.util import compat
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new MethodNameUpdater object from inherited base classes: object with example: obj = MethodNameUpdater(export_dir)