class_docstr: Data loader for FFM format based models, such as xDeepFM.
  Iterator will not load the whole data into memory. Instead, it loads data into memory
  per mini-batch, so that large files can be used as input data.
docstr: Read and parse data from a file.
  
  Args:
      infile (str): Text input file. Each line in this file is an instance.
  
  Returns:
      object: An iterator that yields parsed results, in the format of graph `feed_dict`.
docstr_tok: ["Read","and","parse","data","from","a","file",".","Args",":","infile","(","str",")",":","Text","input","file",".","Each","line","in","this","file","is","an","instance",".","Returns",":","object",":","An","iterator","that","yields","parsed","results",",","in","the","format","of","graph","`","feed_dict","`","."]
code: def load_data_from_file(self, infile):
      """Read and parse data from a file.
  
      Args:
          infile (str): Text input file. Each line in this file is an instance.
  
      Returns:
          object: An iterator that yields parsed results, in the format of graph `feed_dict`.
      """
      label_list = []
      features_list = []
      impression_id_list = []
      cnt = 0
  
      with tf.io.gfile.GFile(infile, "r") as rd:
          for line in rd:
              label, features, impression_id = self.parser_one_line(
                  line
              )
  
              features_list.append(features)
              label_list.append(label)
              impression_id_list.append(impression_id)
  
              cnt += 1
              if cnt == self.batch_size:
                  res = self._convert_data(label_list, features_list)
                  yield self.gen_feed_dict(
                      res
                  ), impression_id_list, self.batch_size
                  label_list = []
                  features_list = []
                  impression_id_list = []
                  cnt = 0
          if cnt > 0:
              res = self._convert_data(label_list, features_list)
              yield self.gen_feed_dict(res), impression_id_list, cnt
  
file_path: recommenders/recommenders/models/deeprec/io/iterator.py
imports: import numpy
  import tensorflow
  import abc
label_desc: Use image node_id 3 for calling the FFMTextIterator obj's underlying member method code with example usage: obj.load_data_from_file(infile) without return types