class_docstr: Base class for sequential models
class_docstr_tok: ["Base","class","for","sequential","models"]
docstr: Make predictions on the given data, and output predicted scores to a file.
  
  Args:
      infile_name (str): Input file name.
      outfile_name (str): Output file name.
  
  Returns:
      object: An instance of self.
docstr_tok: ["Make","predictions","on","the","given","data",",","and","output","predicted","scores","to","a","file",".","Args",":","infile_name","(","str",")",":","Input","file","name",".","outfile_name","(","str",")",":","Output","file","name",".","Returns",":","object",":","An","instance","of","self","."]
code: def predict(self, infile_name, outfile_name):
      """Make predictions on the given data, and output predicted scores to a file.
  
      Args:
          infile_name (str): Input file name.
          outfile_name (str): Output file name.
  
      Returns:
          object: An instance of self.
      """
  
      load_sess = self.sess
      with tf.io.gfile.GFile(outfile_name, "w") as wt:
          for batch_data_input in self.iterator.load_data_from_file(
              infile_name, batch_num_ngs=0
          ):
              if batch_data_input:
                  step_pred = self.infer(load_sess, batch_data_input)
                  step_pred = np.reshape(step_pred, -1)
                  wt.write("\n".join(map(str, step_pred)))
                  wt.write("\n")
      return self
  
file_path: recommenders/recommenders/models/deeprec/models/sequential/sequential_base_model.py
imports: import os
  import abc
  import numpy
  import tensorflow
  from recommenders.models.deeprec.models.base_model import BaseModel
  from recommenders.models.deeprec.deeprec_utils import cal_metric, load_dict
label_desc: Use image node_id 6 for calling the SequentialBaseModel obj's underlying member method code with example usage: obj.predict(infile_name, outfile_name) and returns: self