neulab/docprompting-conala huggingface dataset:
tf.compat.v1.metrics.precision_at_top_k Computes precision@k of the predictions with respect to sparse labels. 
tf.compat.v1.metrics.precision_at_top_k(
    labels, predictions_idx, k=None, class_id=None, weights=None,
    metrics_collections=None, updates_collections=None, name=None
)
 Differs from sparse_precision_at_k in that predictions must be in the form of top k class indices, whereas sparse_precision_at_k expects logits. Refer to sparse_precision_at_k for more details.
 


 Args
  labels   int64 Tensor or SparseTensor with shape [D1, ... DN, num_labels] or [D1, ... DN], where the latter implies num_labels=1. N >= 1 and num_labels is the number of target classes for the associated prediction. Commonly, N=1 and labels has shape [batch_size, num_labels]. [D1, ... DN] must match predictions. Values should be in range [0, num_classes), where num_classes is the last dimension of predictions. Values outside this range are ignored.  
  predictions_idx   Integer Tensor with shape [D1, ... DN, k] where N >= 1. Commonly, N=1 and predictions has shape [batch size, k]. The final dimension contains the top k predicted class indices. [D1, ... DN] must match labels.  
  k   Integer, k for @k metric. Only used for the default op name.  
  class_id   Integer class ID for which we want binary metrics. This should be in range [0, num_classes], where num_classes is the last dimension of predictions. If class_id is outside this range, the method returns NAN.  
  weights   Tensor whose rank is either 0, or n-1, where n is the rank of labels. If the latter, it must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that values should be added to.  
  updates_collections   An optional list of collections that updates should be added to.  
  name   Name of new update operation, and namespace for other dependent ops.   
 


 Returns
  precision   Scalar float64 Tensor with the value of true_positives divided by the sum of true_positives and false_positives.  
  update_op   Operation that increments true_positives and false_positives variables appropriately, and whose value matches precision.   
 


 Raises
  ValueError   If weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.recall Computes the recall of the predictions with respect to the labels. 
tf.compat.v1.metrics.recall(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The recall function creates two local variables, true_positives and false_negatives, that are used to compute the recall. This value is ultimately returned as recall, an idempotent operation that simply divides true_positives by the sum of true_positives and false_negatives. For estimation of the metric over a stream of data, the function creates an update_op that updates these variables and returns the recall. update_op weights each prediction by the corresponding value in weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   The predicted values, a Tensor of arbitrary dimensions. Will be cast to bool.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that recall should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  recall   Scalar float Tensor with the value of true_positives divided by the sum of true_positives and false_negatives.  
  update_op   Operation that increments true_positives and false_negatives variables appropriately and whose value matches recall.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.recall_at_thresholds Computes various recall values for different thresholds on predictions. 
tf.compat.v1.metrics.recall_at_thresholds(
    labels, predictions, thresholds, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The recall_at_thresholds function creates four local variables, true_positives, true_negatives, false_positives and false_negatives for various values of thresholds. recall[i] is defined as the total weight of values in predictions above thresholds[i] whose corresponding entry in labels is True, divided by the total weight of True values in labels (true_positives[i] / (true_positives[i] + false_negatives[i])). For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the recall. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   A floating point Tensor of arbitrary shape and whose values are in the range [0, 1].  
  thresholds   A python list or tuple of float thresholds in [0, 1].  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that recall should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  recall   A float Tensor of shape [len(thresholds)].  
  update_op   An operation that increments the true_positives, true_negatives, false_positives and false_negatives variables that are used in the computation of recall.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.recall_at_top_k Computes recall@k of top-k predictions with respect to sparse labels. 
tf.compat.v1.metrics.recall_at_top_k(
    labels, predictions_idx, k=None, class_id=None, weights=None,
    metrics_collections=None, updates_collections=None, name=None
)
 Differs from recall_at_k in that predictions must be in the form of top k class indices, whereas recall_at_k expects logits. Refer to recall_at_k for more details.
 


 Args
  labels   int64 Tensor or SparseTensor with shape [D1, ... DN, num_labels] or [D1, ... DN], where the latter implies num_labels=1. N >= 1 and num_labels is the number of target classes for the associated prediction. Commonly, N=1 and labels has shape [batch_size, num_labels]. [D1, ... DN] must match predictions. Values should be in range [0, num_classes), where num_classes is the last dimension of predictions. Values outside this range always count towards false_negative_at_<k>.  
  predictions_idx   Integer Tensor with shape [D1, ... DN, k] where N >= 1. Commonly, N=1 and predictions has shape [batch size, k]. The final dimension contains the top k predicted class indices. [D1, ... DN] must match labels.  
  k   Integer, k for @k metric. Only used for the default op name.  
  class_id   Integer class ID for which we want binary metrics. This should be in range [0, num_classes), where num_classes is the last dimension of predictions. If class_id is outside this range, the method returns NAN.  
  weights   Tensor whose rank is either 0, or n-1, where n is the rank of labels. If the latter, it must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that values should be added to.  
  updates_collections   An optional list of collections that updates should be added to.  
  name   Name of new update operation, and namespace for other dependent ops.   
 


 Returns
  recall   Scalar float64 Tensor with the value of true_positives divided by the sum of true_positives and false_negatives.  
  update_op   Operation that increments true_positives and false_negatives variables appropriately, and whose value matches recall.   
 


 Raises
  ValueError   If weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.
tf.compat.v1.metrics.root_mean_squared_error Computes the root mean squared error between the labels and predictions. 
tf.compat.v1.metrics.root_mean_squared_error(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The root_mean_squared_error function creates two local variables, total and count that are used to compute the root mean squared error. This average is weighted by weights, and it is ultimately returned as root_mean_squared_error: an idempotent operation that takes the square root of the division of total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the root_mean_squared_error. Internally, a squared_error operation computes the element-wise square of the difference between predictions and labels. Then update_op increments total with the reduced sum of the product of weights and squared_error, and it increments count with the reduced sum of weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of the same shape as predictions.  
  predictions   A Tensor of arbitrary shape.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that root_mean_squared_error should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  root_mean_squared_error   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately and whose value matches root_mean_squared_error.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.sensitivity_at_specificity Computes the specificity at a given sensitivity. 
tf.compat.v1.metrics.sensitivity_at_specificity(
    labels, predictions, specificity, weights=None, num_thresholds=200,
    metrics_collections=None, updates_collections=None, name=None
)
 The sensitivity_at_specificity function creates four local variables, true_positives, true_negatives, false_positives and false_negatives that are used to compute the sensitivity at the given specificity value. The threshold for the given specificity value is computed and used to evaluate the corresponding sensitivity. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the sensitivity. update_op increments the true_positives, true_negatives, false_positives and false_negatives counts with the weight of each case found in the predictions and labels. If weights is None, weights default to 1. Use weights of 0 to mask values. For additional information about specificity and sensitivity, see the following: https://en.wikipedia.org/wiki/Sensitivity_and_specificity
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   A floating point Tensor of arbitrary shape and whose values are in the range [0, 1].  
  specificity   A scalar value in range [0, 1].  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  num_thresholds   The number of thresholds to use for matching the given specificity.  
  metrics_collections   An optional list of collections that sensitivity should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  sensitivity   A scalar Tensor representing the sensitivity at the given specificity value.  
  update_op   An operation that increments the true_positives, true_negatives, false_positives and false_negatives variables appropriately and whose value matches sensitivity.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, if weights is not None and its shape doesn't match predictions, or if specificity is not between 0 and 1, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.sparse_average_precision_at_k Renamed to average_precision_at_k, please use that method instead. (deprecated) 
tf.compat.v1.metrics.sparse_average_precision_at_k(
    labels, predictions, k, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use average_precision_at_k instead
tf.compat.v1.metrics.sparse_precision_at_k Renamed to precision_at_k, please use that method instead. (deprecated) 
tf.compat.v1.metrics.sparse_precision_at_k(
    labels, predictions, k, class_id=None, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use precision_at_k instead
tf.compat.v1.metrics.specificity_at_sensitivity Computes the specificity at a given sensitivity. 
tf.compat.v1.metrics.specificity_at_sensitivity(
    labels, predictions, sensitivity, weights=None, num_thresholds=200,
    metrics_collections=None, updates_collections=None, name=None
)
 The specificity_at_sensitivity function creates four local variables, true_positives, true_negatives, false_positives and false_negatives that are used to compute the specificity at the given sensitivity value. The threshold for the given sensitivity value is computed and used to evaluate the corresponding specificity. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the specificity. update_op increments the true_positives, true_negatives, false_positives and false_negatives counts with the weight of each case found in the predictions and labels. If weights is None, weights default to 1. Use weights of 0 to mask values. For additional information about specificity and sensitivity, see the following: https://en.wikipedia.org/wiki/Sensitivity_and_specificity
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   A floating point Tensor of arbitrary shape and whose values are in the range [0, 1].  
  sensitivity   A scalar value in range [0, 1].  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  num_thresholds   The number of thresholds to use for matching the given sensitivity.  
  metrics_collections   An optional list of collections that specificity should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  specificity   A scalar Tensor representing the specificity at the given sensitivity value.  
  update_op   An operation that increments the true_positives, true_negatives, false_positives and false_negatives variables appropriately and whose value matches specificity.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, if weights is not None and its shape doesn't match predictions, or if sensitivity is not between 0 and 1, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.true_negatives Sum the weights of true_negatives. 
tf.compat.v1.metrics.true_negatives(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   The predicted values, a Tensor of arbitrary dimensions. Will be cast to bool.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that the metric value variable should be added to.  
  updates_collections   An optional list of collections that the metric update ops should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  value_tensor   A Tensor representing the current value of the metric.  
  update_op   An operation that accumulates the error from a batch of data.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.true_negatives_at_thresholds Computes true negatives at provided threshold values. 
tf.compat.v1.metrics.true_negatives_at_thresholds(
    labels, predictions, thresholds, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor whose shape matches predictions. Will be cast to bool.  
  predictions   A floating point Tensor of arbitrary shape and whose values are in the range [0, 1].  
  thresholds   A python list or tuple of float thresholds in [0, 1].  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that true_negatives should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  true_negatives   A float Tensor of shape [len(thresholds)].  
  update_op   An operation that updates the true_negatives variable and returns its current value.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.true_positives Sum the weights of true_positives. 
tf.compat.v1.metrics.true_positives(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   The predicted values, a Tensor of arbitrary dimensions. Will be cast to bool.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that the metric value variable should be added to.  
  updates_collections   An optional list of collections that the metric update ops should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  value_tensor   A Tensor representing the current value of the metric.  
  update_op   An operation that accumulates the error from a batch of data.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.true_positives_at_thresholds Computes true positives at provided threshold values. 
tf.compat.v1.metrics.true_positives_at_thresholds(
    labels, predictions, thresholds, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor whose shape matches predictions. Will be cast to bool.  
  predictions   A floating point Tensor of arbitrary shape and whose values are in the range [0, 1].  
  thresholds   A python list or tuple of float thresholds in [0, 1].  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that true_positives should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  true_positives   A float Tensor of shape [len(thresholds)].  
  update_op   An operation that updates the true_positives variable and returns its current value.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.min_max_variable_partitioner Partitioner to allocate minimum size per slice. 
tf.compat.v1.min_max_variable_partitioner(
    max_partitions=1, axis=0, min_slice_size=(256 << 10),
    bytes_per_string_element=16
)
 Returns a partitioner that partitions the variable of given shape and dtype such that each partition has a minimum of min_slice_size slice of the variable. The maximum number of such partitions (upper bound) is given by max_partitions.
 


 Args
  max_partitions   Upper bound on the number of partitions. Defaults to 1.  
  axis   Axis along which to partition the variable. Defaults to 0.  
  min_slice_size   Minimum size of the variable slice per partition. Defaults to 256K.  
  bytes_per_string_element   If the Variable is of type string, this provides an estimate of how large each scalar in the Variable is.   
 


 Returns   A partition function usable as the partitioner argument to variable_scope and get_variable.