class_docstr: Configuration builder for WitWidget settings.
docstr: Sets the model for inference as a TF Estimator.
  
  Instead of using TF Serving to host a model for WIT to query, WIT can
  directly use a TF Estimator object as the model to query. In order to
  accomplish this, a feature_spec must also be provided to parse the
  example protos for input into the estimator.
  
  Args:
    estimator: The TF Estimator which will be used for model inference.
    feature_spec: The feature_spec object which will be used for example
    parsing.
  
  Returns:
    self, in order to enabled method chaining.
docstr_tok: ["Sets","the","model","for","inference","as","a","TF","Estimator",".","Instead","of","using","TF","Serving","to","host","a","model","for","WIT","to","query",",","WIT","can","directly","use","a","TF","Estimator","object","as","the","model","to","query",".","In","order","to","accomplish","this",",","a","feature_spec","must","also","be","provided","to","parse","the","example","protos","for","input","into","the","estimator",".","Args",":","estimator",":","The","TF","Estimator","which","will","be","used","for","model","inference",".","feature_spec",":","The","feature_spec","object","which","will","be","used","for","example","parsing",".","Returns",":","self",",","in","order","to","enabled","method","chaining","."]
code: def set_estimator_and_feature_spec(self, estimator, feature_spec):
      """Sets the model for inference as a TF Estimator.
  
      Instead of using TF Serving to host a model for WIT to query, WIT can
      directly use a TF Estimator object as the model to query. In order to
      accomplish this, a feature_spec must also be provided to parse the
      example protos for input into the estimator.
  
      Args:
        estimator: The TF Estimator which will be used for model inference.
        feature_spec: The feature_spec object which will be used for example
        parsing.
  
      Returns:
        self, in order to enabled method chaining.
      """
      # If custom function is set, remove it before setting estimator
      self.delete("custom_predict_fn")
  
      self.store(
          "estimator_and_spec",
          {"estimator": estimator, "feature_spec": feature_spec},
      )
      self.set_inference_address("estimator")
      # If no model name has been set, give a default
      if not self.has_model_name():
          self.set_model_name("1")
      return self
  
imports: import sys
  import tensorflow
label_desc: Use image node_id 23 for calling the WitConfigBuilder obj's underlying member method code with example usage: obj.set_estimator_and_feature_spec(estimator, feature_spec) and returns: self