neulab/docprompting-conala huggingface dataset:
tf.compat.v1.RunOptions A ProtocolMessage
 


 Attributes
  debug_options   DebugOptions debug_options  
  experimental   Experimental experimental  
  inter_op_thread_pool   int32 inter_op_thread_pool  
  output_partition_graphs   bool output_partition_graphs  
  report_tensor_allocations_upon_oom   bool report_tensor_allocations_upon_oom  
  timeout_in_ms   int64 timeout_in_ms  
  trace_level   TraceLevel trace_level    Child Classes class Experimental
 


 Class Variables
  FULL_TRACE   3  
  HARDWARE_TRACE   2  
  NO_TRACE   0  
  SOFTWARE_TRACE   1  
  TraceLevel
tf.compat.v1.RunOptions.Experimental A ProtocolMessage
 


 Attributes
  collective_graph_key   int64 collective_graph_key  
  run_handler_pool_options   RunHandlerPoolOptions run_handler_pool_options  
  use_run_handler_pool   bool use_run_handler_pool    Child Classes class RunHandlerPoolOptions
tf.compat.v1.RunOptions.Experimental.RunHandlerPoolOptions A ProtocolMessage
 


 Attributes
  priority   int64 priority
Module: tf.compat.v1.saved_model Public API for tf.saved_model namespace. Modules builder module: SavedModel builder. constants module: Constants for SavedModel save and restore operations. experimental module: Public API for tf.saved_model.experimental namespace. loader module: Loader functionality for SavedModel with hermetic, language-neutral exports. main_op module: SavedModel main op. signature_constants module: Signature constants for SavedModel save and restore operations. signature_def_utils module: SignatureDef utility functions. tag_constants module: Common tags used for graphs in SavedModel. utils module: SavedModel utility functions. Classes class Asset: Represents a file asset to hermetically include in a SavedModel. class Builder: Builds the SavedModel protocol buffer and saves variables and assets. class SaveOptions: Options for saving to SavedModel. Functions build_signature_def(...): Utility function to build a SignatureDef protocol buffer. build_tensor_info(...): Utility function to build TensorInfo proto from a Tensor. (deprecated) classification_signature_def(...): Creates classification signature from given examples and predictions. contains_saved_model(...): Checks whether the provided export directory could contain a SavedModel. get_tensor_from_tensor_info(...): Returns the Tensor or CompositeTensor described by a TensorInfo proto. (deprecated) is_valid_signature(...): Determine whether a SignatureDef can be served by TensorFlow Serving. load(...): Loads the model from a SavedModel as specified by tags. (deprecated) load_v2(...): Load a SavedModel from export_dir. main_op_with_restore(...): Returns a main op to init variables, tables and restore the graph. (deprecated) maybe_saved_model_directory(...): Checks whether the provided export directory could contain a SavedModel. predict_signature_def(...): Creates prediction signature from given inputs and outputs. regression_signature_def(...): Creates regression signature from given examples and predictions. save(...): Exports the Trackable object obj to SavedModel format. simple_save(...): Convenience function to build a SavedModel suitable for serving. (deprecated)
 


 Other Members
  ASSETS_DIRECTORY   'assets'  
  ASSETS_KEY   'saved_model_assets'  
  CLASSIFY_INPUTS   'inputs'  
  CLASSIFY_METHOD_NAME   'tensorflow/serving/classify'  
  CLASSIFY_OUTPUT_CLASSES   'classes'  
  CLASSIFY_OUTPUT_SCORES   'scores'  
  DEBUG_DIRECTORY   'debug'  
  DEBUG_INFO_FILENAME_PB   'saved_model_debug_info.pb'  
  DEFAULT_SERVING_SIGNATURE_DEF_KEY   'serving_default'  
  GPU   'gpu'  
  LEGACY_INIT_OP_KEY   'legacy_init_op'  
  MAIN_OP_KEY   'saved_model_main_op'  
  PREDICT_INPUTS   'inputs'  
  PREDICT_METHOD_NAME   'tensorflow/serving/predict'  
  PREDICT_OUTPUTS   'outputs'  
  REGRESS_INPUTS   'inputs'  
  REGRESS_METHOD_NAME   'tensorflow/serving/regress'  
  REGRESS_OUTPUTS   'outputs'  
  SAVED_MODEL_FILENAME_PB   'saved_model.pb'  
  SAVED_MODEL_FILENAME_PBTXT   'saved_model.pbtxt'  
  SAVED_MODEL_SCHEMA_VERSION   1  
  SERVING   'serve'  
  TPU   'tpu'  
  TRAINING   'train'  
  VARIABLES_DIRECTORY   'variables'  
  VARIABLES_FILENAME   'variables'
Module: tf.compat.v1.saved_model.builder SavedModel builder. Builds a SavedModel that can be saved to storage, is language neutral, and enables systems to produce, consume, or transform TensorFlow Models. Classes class SavedModelBuilder: Builds the SavedModel protocol buffer and saves variables and assets.
tf.compat.v1.saved_model.build_signature_def Utility function to build a SignatureDef protocol buffer.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.signature_def_utils.build_signature_def  
tf.compat.v1.saved_model.build_signature_def(
    inputs=None, outputs=None, method_name=None
)

 


 Args
  inputs   Inputs of the SignatureDef defined as a proto map of string to tensor info.  
  outputs   Outputs of the SignatureDef defined as a proto map of string to tensor info.  
  method_name   Method name of the SignatureDef as a string.   
 


 Returns   A SignatureDef protocol buffer constructed based on the supplied arguments.
tf.compat.v1.saved_model.build_tensor_info Utility function to build TensorInfo proto from a Tensor. (deprecated)  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.utils.build_tensor_info  
tf.compat.v1.saved_model.build_tensor_info(
    tensor
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.
 


 Args
  tensor   Tensor or SparseTensor whose name, dtype and shape are used to build the TensorInfo. For SparseTensors, the names of the three constituent Tensors are used.   
 


 Returns   A TensorInfo protocol buffer constructed based on the supplied argument.  

 


 Raises
  RuntimeError   If eager execution is enabled.
tf.compat.v1.saved_model.classification_signature_def Creates classification signature from given examples and predictions.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.signature_def_utils.classification_signature_def  
tf.compat.v1.saved_model.classification_signature_def(
    examples, classes, scores
)
 This function produces signatures intended for use with the TensorFlow Serving Classify API (tensorflow_serving/apis/prediction_service.proto), and so constrains the input and output types to those allowed by TensorFlow Serving.
 


 Args
  examples   A string Tensor, expected to accept serialized tf.Examples.  
  classes   A string Tensor. Note that the ClassificationResponse message requires that class labels are strings, not integers or anything else.  
  scores   a float Tensor.   
 


 Returns   A classification-flavored signature_def.  

 


 Raises
  ValueError   If examples is None.
Module: tf.compat.v1.saved_model.constants Constants for SavedModel save and restore operations.
 


 Other Members
  ASSETS_DIRECTORY   'assets'  
  ASSETS_KEY   'saved_model_assets'  
  DEBUG_DIRECTORY   'debug'  
  DEBUG_INFO_FILENAME_PB   'saved_model_debug_info.pb'  
  LEGACY_INIT_OP_KEY   'legacy_init_op'  
  MAIN_OP_KEY   'saved_model_main_op'  
  SAVED_MODEL_FILENAME_PB   'saved_model.pb'  
  SAVED_MODEL_FILENAME_PBTXT   'saved_model.pbtxt'  
  SAVED_MODEL_SCHEMA_VERSION   1  
  VARIABLES_DIRECTORY   'variables'  
  VARIABLES_FILENAME   'variables'
tf.compat.v1.saved_model.contains_saved_model Checks whether the provided export directory could contain a SavedModel.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.loader.maybe_saved_model_directory, tf.compat.v1.saved_model.maybe_saved_model_directory  
tf.compat.v1.saved_model.contains_saved_model(
    export_dir
)
 Note that the method does not load any data by itself. If the method returns false, the export directory definitely does not contain a SavedModel. If the method returns true, the export directory may contain a SavedModel but provides no guarantee that it can be loaded.
 


 Args
  export_dir   Absolute string path to possible export location. For example, '/my/foo/model'.   
 


 Returns   True if the export directory contains SavedModel files, False otherwise.
Module: tf.compat.v1.saved_model.experimental Public API for tf.saved_model.experimental namespace. Classes class VariablePolicy: Enum defining options for variable handling when saving. Functions save(...): Exports the Trackable object obj to SavedModel format.
tf.compat.v1.saved_model.get_tensor_from_tensor_info Returns the Tensor or CompositeTensor described by a TensorInfo proto. (deprecated)  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.utils.get_tensor_from_tensor_info  
tf.compat.v1.saved_model.get_tensor_from_tensor_info(
    tensor_info, graph=None, import_scope=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.get_tensor_from_tensor_info or tf.compat.v1.saved_model.get_tensor_from_tensor_info.
 


 Args
  tensor_info   A TensorInfo proto describing a Tensor or SparseTensor or CompositeTensor.  
  graph   The tf.Graph in which tensors are looked up. If None, the current default graph is used.  
  import_scope   If not None, names in tensor_info are prefixed with this string before lookup.   
 


 Returns   The Tensor or SparseTensor or CompositeTensor in graph described by tensor_info.  

 


 Raises
  KeyError   If tensor_info does not correspond to a tensor in graph.  
  ValueError   If tensor_info is malformed.
tf.compat.v1.saved_model.is_valid_signature Determine whether a SignatureDef can be served by TensorFlow Serving.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.signature_def_utils.is_valid_signature  
tf.compat.v1.saved_model.is_valid_signature(
    signature_def
)
tf.compat.v1.saved_model.load Loads the model from a SavedModel as specified by tags. (deprecated)  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.loader.load  
tf.compat.v1.saved_model.load(
    sess, tags, export_dir, import_scope=None, **saver_kwargs
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.loader.load or tf.compat.v1.saved_model.load. There will be a new function for importing SavedModels in Tensorflow 2.0.
 


 Args
  sess   The TensorFlow session to restore the variables.  
  tags   Set of string tags to identify the required MetaGraphDef. These should correspond to the tags used when saving the variables using the SavedModel save() API.  
  export_dir   Directory in which the SavedModel protocol buffer and variables to be loaded are located.  
  import_scope   Optional string -- if specified, prepend this string followed by '/' to all loaded tensor names. This scope is applied to tensor instances loaded into the passed session, but it is not written through to the static MetaGraphDef protocol buffer that is returned.  
  **saver_kwargs   Optional keyword arguments passed through to Saver.   
 


 Returns   The MetaGraphDef protocol buffer loaded in the provided session. This can be used to further extract signature-defs, collection-defs, etc.  

 


 Raises
  RuntimeError   MetaGraphDef associated with the tags cannot be found.
Module: tf.compat.v1.saved_model.loader Loader functionality for SavedModel with hermetic, language-neutral exports. Load and restore capability for a SavedModel, which may include multiple meta graph defs. Each SavedModel is associated with a single checkpoint. Each meta graph def is saved with one or more tags, which are used to identify the exact meta graph def to load. The load operation requires the session in which to restore the graph definition and variables, the tags used to identify the meta graph def to load and the location of the SavedModel. Upon a load, the subset of variables and assets supplied as part of the specific meta graph def, will be restored into the supplied session. The values of the variables though will correspond to the saved values from the first meta graph added to the SavedModel using add_meta_graph_and_variables(...) in builder.py. Typical usage: ...
builder = tf.compat.v1.saved_model.builder.SavedModelBuilder(export_dir)

with tf.compat.v1.Session(graph=tf.Graph()) as sess:
  ...
  builder.add_meta_graph_and_variables(sess,
                                       ["foo-tag"],
                                       signature_def_map=foo_signatures,
                                       assets_collection=foo_assets)
...

with tf.compat.v1.Session(graph=tf.Graph()) as sess:
  ...
  builder.add_meta_graph(["bar-tag", "baz-tag"],
                         assets_collection=bar_baz_assets)
...

builder.save()

...
with tf.compat.v1.Session(graph=tf.Graph()) as sess:
  tf.compat.v1.saved_model.loader.load(sess, ["foo-tag"], export_dir)
  ...

 Functions load(...): Loads the model from a SavedModel as specified by tags. (deprecated) maybe_saved_model_directory(...): Checks whether the provided export directory could contain a SavedModel.
Module: tf.compat.v1.saved_model.main_op SavedModel main op. Builds a main op that defines the sequence of ops to be run as part of the SavedModel load/restore operations. Functions main_op(...): Returns a main op to init variables and tables. (deprecated) main_op_with_restore(...): Returns a main op to init variables, tables and restore the graph. (deprecated)
tf.compat.v1.saved_model.main_op.main_op Returns a main op to init variables and tables. (deprecated) 
tf.compat.v1.saved_model.main_op.main_op()
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.main_op.main_op. Returns the main op including the group of ops that initializes all variables, initializes local variables and initialize all tables.
 


 Returns   The set of ops to be run as part of the main op upon the load operation.
tf.compat.v1.saved_model.main_op_with_restore Returns a main op to init variables, tables and restore the graph. (deprecated)  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.main_op.main_op_with_restore  
tf.compat.v1.saved_model.main_op_with_restore(
    restore_op_name
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.main_op_with_restore or tf.compat.v1.saved_model.main_op.main_op_with_restore. Returns the main op including the group of ops that initializes all variables, initialize local variables, initialize all tables and the restore op name.
 


 Args
  restore_op_name   Name of the op to use to restore the graph.   
 


 Returns   The set of ops to be run as part of the main op upon the load operation.
tf.compat.v1.saved_model.predict_signature_def Creates prediction signature from given inputs and outputs.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.signature_def_utils.predict_signature_def  
tf.compat.v1.saved_model.predict_signature_def(
    inputs, outputs
)
 This function produces signatures intended for use with the TensorFlow Serving Predict API (tensorflow_serving/apis/prediction_service.proto). This API imposes no constraints on the input and output types.
 


 Args
  inputs   dict of string to Tensor.  
  outputs   dict of string to Tensor.   
 


 Returns   A prediction-flavored signature_def.  

 


 Raises
  ValueError   If inputs or outputs is None.
tf.compat.v1.saved_model.regression_signature_def Creates regression signature from given examples and predictions.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.saved_model.signature_def_utils.regression_signature_def  
tf.compat.v1.saved_model.regression_signature_def(
    examples, predictions
)
 This function produces signatures intended for use with the TensorFlow Serving Regress API (tensorflow_serving/apis/prediction_service.proto), and so constrains the input and output types to those allowed by TensorFlow Serving.
 


 Args
  examples   A string Tensor, expected to accept serialized tf.Examples.  
  predictions   A float Tensor.   
 


 Returns   A regression-flavored signature_def.  

 


 Raises
  ValueError   If examples is None.
Module: tf.compat.v1.saved_model.signature_constants Signature constants for SavedModel save and restore operations.
 


 Other Members
  CLASSIFY_INPUTS   'inputs'  
  CLASSIFY_METHOD_NAME   'tensorflow/serving/classify'  
  CLASSIFY_OUTPUT_CLASSES   'classes'  
  CLASSIFY_OUTPUT_SCORES   'scores'  
  DEFAULT_SERVING_SIGNATURE_DEF_KEY   'serving_default'  
  PREDICT_INPUTS   'inputs'  
  PREDICT_METHOD_NAME   'tensorflow/serving/predict'  
  PREDICT_OUTPUTS   'outputs'  
  REGRESS_INPUTS   'inputs'  
  REGRESS_METHOD_NAME   'tensorflow/serving/regress'  
  REGRESS_OUTPUTS   'outputs'
Module: tf.compat.v1.saved_model.signature_def_utils SignatureDef utility functions. Utility functions for building and inspecting SignatureDef protos. Classes class MethodNameUpdater: Updates the method name(s) of the SavedModel stored in the given path. Functions build_signature_def(...): Utility function to build a SignatureDef protocol buffer. classification_signature_def(...): Creates classification signature from given examples and predictions. is_valid_signature(...): Determine whether a SignatureDef can be served by TensorFlow Serving. predict_signature_def(...): Creates prediction signature from given inputs and outputs. regression_signature_def(...): Creates regression signature from given examples and predictions.
tf.compat.v1.saved_model.signature_def_utils.MethodNameUpdater Updates the method name(s) of the SavedModel stored in the given path. 
tf.compat.v1.saved_model.signature_def_utils.MethodNameUpdater(
    export_dir
)
 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 ...
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.

 


 Args
  export_dir   Directory containing the SavedModel files.   
 


 Raises
  IOError   If the saved model file does not exist, or cannot be successfully parsed.    Methods replace_method_name View source 
replace_method_name(
    signature_key, method_name, tags=None
)
 Replaces the method_name in the specified signature_def. This will match and replace multiple sig defs iff tags is None (i.e when multiple MetaGraphs have a signature_def with the same key). If tags is not None, this will only replace a single signature_def in the MetaGraph with matching tags.
 


 Args
  signature_key   Key of the signature_def to be updated.  
  method_name   new method_name to replace the existing one.  
  tags   A tag or sequence of tags identifying the MetaGraph to update. If None, all meta graphs will be updated.   
 


 Raises
  ValueError   if signature_key or method_name are not defined or if no metagraphs were found with the associated tags or if no meta graph has a signature_def that matches signature_key.    save View source 
save(
    new_export_dir=None
)
 Saves the updated SavedModel.
 


 Args
  new_export_dir   Path where the updated SavedModel will be saved. If None, the input SavedModel will be overriden with the updates.   
 


 Raises
  errors.OpError   If there are errors during the file save operation.
tf.compat.v1.saved_model.simple_save Convenience function to build a SavedModel suitable for serving. (deprecated) 
tf.compat.v1.saved_model.simple_save(
    session, export_dir, inputs, outputs, legacy_init_op=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.simple_save. In many common cases, saving models for serving will be as simple as: simple_save(session,
            export_dir,
            inputs={"x": x, "y": y},
            outputs={"z": z})
 Although in many cases it's not necessary to understand all of the many ways to configure a SavedModel, this method has a few practical implications:  It will be treated as a graph for inference / serving (i.e. uses the tag saved_model.SERVING) The SavedModel will load in TensorFlow Serving and supports the Predict API. To use the Classify, Regress, or MultiInference APIs, please use either tf.Estimator or the lower level SavedModel APIs. Some TensorFlow ops depend on information on disk or other information called "assets". These are generally handled automatically by adding the assets to the GraphKeys.ASSET_FILEPATHS collection. Only assets in that collection are exported; if you need more custom behavior, you'll need to use the SavedModelBuilder.  More information about SavedModel and signatures can be found here: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/saved_model/README.md
 


 Args
  session   The TensorFlow session from which to save the meta graph and variables.  
  export_dir   The path to which the SavedModel will be stored.  
  inputs   dict mapping string input names to tensors. These are added to the SignatureDef as the inputs.  
  outputs   dict mapping string output names to tensors. These are added to the SignatureDef as the outputs.  
  legacy_init_op   Legacy support for op or group of ops to execute after the restore op upon a load.
Module: tf.compat.v1.saved_model.tag_constants Common tags used for graphs in SavedModel.
 


 Other Members
  GPU   'gpu'  
  SERVING   'serve'  
  TPU   'tpu'  
  TRAINING   'train'
Module: tf.compat.v1.saved_model.utils SavedModel utility functions. Utility functions to assist with setup and construction of the SavedModel proto. Functions build_tensor_info(...): Utility function to build TensorInfo proto from a Tensor. (deprecated) get_tensor_from_tensor_info(...): Returns the Tensor or CompositeTensor described by a TensorInfo proto. (deprecated)
tf.compat.v1.scalar_mul Multiplies a scalar times a Tensor or IndexedSlices object.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.math.scalar_mul  
tf.compat.v1.scalar_mul(
    scalar, x, name=None
)
 Intended for use in gradient code which might deal with IndexedSlices objects, which are easy to multiply by a scalar but more expensive to multiply with arbitrary tensors.
 


 Args
  scalar   A 0-D scalar Tensor. Must have known shape.  
  x   A Tensor or IndexedSlices to be scaled.  
  name   A name for the operation (optional).   
 


 Returns   scalar * x of the same type (Tensor or IndexedSlices) as x.  

 


 Raises
  ValueError   if scalar is not a 0-D scalar.