class_docstr: Basic class of models
  
  Attributes:
      hparams (HParams): A HParams object, holds the entire set of hyperparameters.
      train_iterator (object): An iterator to load the data in training steps.
      test_iterator (object): An iterator to load the data in testing steps.
      graph (object): An optional graph.
      seed (int): Random seed.
class_docstr_tok: ["Basic","class","of","models","Attributes",":","hparams","(","HParams",")",":","A","HParams","object",",","holds","the","entire","set","of","hyperparameters",".","train_iterator","(","object",")",":","An","iterator","to","load","the","data","in","training","steps",".","test_iterator","(","object",")",":","An","iterator","to","load","the","data","in","testing","steps",".","graph","(","object",")",":","An","optional","graph",".","seed","(","int",")",":","Random","seed","."]
code: def run_news(self, news_filename):
      if not hasattr(self, "newsencoder"):
          raise ValueError("model must have attribute newsencoder")
  
      news_indexes = []
      news_vecs = []
      for batch_data_input in tqdm(
          self.test_iterator.load_news_from_file(news_filename)
      ):
          news_index, news_vec = self.news(batch_data_input)
          news_indexes.extend(np.reshape(news_index, -1))
          news_vecs.extend(news_vec)
  
      return dict(zip(news_indexes, news_vecs))
  
imports: import abc
  import time
  import numpy
  from tqdm import tqdm
  import tensorflow
  from tensorflow.compat.v1 import keras
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 16 for calling the BaseModel obj's underlying member method code with example usage: obj.run_news(news_filename) and returns: dict