class_docstr: An AdaNet candidate.
  
  A `_Candidate` tracks the progress of a candidate subnetwork's training
  within an ensemble, as well as their AdaNet loss over time.
class_docstr_tok: ["An","AdaNet","candidate",".","A","`","_Candidate","`","tracks","the","progress","of","a","candidate","subnetwork","'s","training","within","an","ensemble",",","as","well","as","their","AdaNet","loss","over","time","."]
docstr: Creates a validated `_Candidate` instance.
  
  Args:
    ensemble_spec: The `_EnsembleSpec` instance to track.
    adanet_loss: float `Tensor` representing the ensemble's AdaNet loss on the
      training set as defined in Equation (4) of the paper.
    variables: List of `tf.Variable` instances associated with the ensemble.
  
  Returns:
    A validated `_Candidate` object.
  
  Raises:
    ValueError: If validation fails.
docstr_tok: ["Creates","a","validated","`","_Candidate","`","instance",".","Args",":","ensemble_spec",":","The","`","_EnsembleSpec","`","instance","to","track",".","adanet_loss",":","float","`","Tensor","`","representing","the","ensemble","'s","AdaNet","loss","on","the","training","set","as","defined","in","Equation","(","4",")","of","the","paper",".","variables",":","List","of","`","tf.Variable","`","instances","associated","with","the","ensemble",".","Returns",":","A","validated","`","_Candidate","`","object",".","Raises",":","ValueError",":","If","validation","fails","."]
code: def __new__(cls, ensemble_spec, adanet_loss, variables):
      """Creates a validated `_Candidate` instance.
  
      Args:
        ensemble_spec: The `_EnsembleSpec` instance to track.
        adanet_loss: float `Tensor` representing the ensemble's AdaNet loss on the
          training set as defined in Equation (4) of the paper.
        variables: List of `tf.Variable` instances associated with the ensemble.
  
      Returns:
        A validated `_Candidate` object.
  
      Raises:
        ValueError: If validation fails.
      """
  
      if ensemble_spec is None:
          raise ValueError("ensemble_spec is required")
      if adanet_loss is None:
          raise ValueError("adanet_loss is required")
      return super(_Candidate, cls).__new__(
          cls,
          ensemble_spec=ensemble_spec,
          adanet_loss=adanet_loss,
          variables=variables,
      )
  
file_path: adanet/adanet/core/candidate.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from adanet import tf_compat
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling the _Candidate obj's underlying member method code with example usage: obj.__new__(cls, ensemble_spec, adanet_loss, variables) and returns: super