docstr: *For InputMode.SPARK only*: Feeds Spark RDD partitions into the TensorFlow worker nodes and returns an RDD of results
  
  It is the responsibility of the TensorFlow "main" function to interpret the rows of the RDD and provide valid data for the output RDD.
  
  This will use the distributed TensorFlow cluster for inferencing, so the TensorFlow "main" function should be capable of inferencing.
  Per Spark design, the output RDD will be lazily-executed only when a Spark action is invoked on the RDD.
  
  Args:
    :dataRDD: input data as a Spark RDD
    :feed_timeout: number of seconds after which data feeding times out (600 sec default)
    :qname: *INTERNAL_USE*
  
  Returns:
    A Spark RDD representing the output of the TensorFlow inferencing
docstr_tok: ["*","For","InputMode.SPARK","only","*",":","Feeds","Spark","RDD","partitions","into","the","TensorFlow","worker","nodes","and","returns","an","RDD","of","results","It","is","the","responsibility","of","the","TensorFlow","``","main","''","function","to","interpret","the","rows","of","the","RDD","and","provide","valid","data","for","the","output","RDD",".","This","will","use","the","distributed","TensorFlow","cluster","for","inferencing",",","so","the","TensorFlow","``","main","''","function","should","be","capable","of","inferencing",".","Per","Spark","design",",","the","output","RDD","will","be","lazily-executed","only","when","a","Spark","action","is","invoked","on","the","RDD",".","Args",":",":","dataRDD",":","input","data","as","a","Spark","RDD",":","feed_timeout",":","number","of","seconds","after","which","data","feeding","times","out","(","600","sec","default",")",":","qname",":","*","INTERNAL_USE","*","Returns",":","A","Spark","RDD","representing","the","output","of","the","TensorFlow","inferencing"]
code: def inference(self, dataRDD, feed_timeout=600, qname="input"):
      """*For InputMode.SPARK only*: Feeds Spark RDD partitions into the TensorFlow worker nodes and returns an RDD of results
  
      It is the responsibility of the TensorFlow "main" function to interpret the rows of the RDD and provide valid data for the output RDD.
  
      This will use the distributed TensorFlow cluster for inferencing, so the TensorFlow "main" function should be capable of inferencing.
      Per Spark design, the output RDD will be lazily-executed only when a Spark action is invoked on the RDD.
  
      Args:
        :dataRDD: input data as a Spark RDD
        :feed_timeout: number of seconds after which data feeding times out (600 sec default)
        :qname: *INTERNAL_USE*
  
      Returns:
        A Spark RDD representing the output of the TensorFlow inferencing
      """
      logger.info("Feeding inference data")
      assert (
          self.input_mode == InputMode.SPARK
      ), "TFCluster.inference() requires InputMode.SPARK"
      assert qname in self.queues, "Unknown queue: {}".format(qname)
      return dataRDD.mapPartitions(
          TFSparkNode.inference(
              self.cluster_info, feed_timeout=feed_timeout, qname=qname
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import nested_scopes
  from __future__ import print_function
  import logging
  import os
  import random
  import signal
  import sys
  import threading
  import time
  from pyspark.streaming import DStream
  from .None import reservation
  from .None import TFManager
  from .None import TFSparkNode
label_desc: Use image node_id 2 for calling the TFCluster obj's underlying member method code with example usage: obj.inference(dataRDD, feed_timeout, qname) and returns: dataRDD