class_docstr: The ImplicitModelTrainer class implements logics for basic recommender training and evaluation using users' 
  *implicit feedback*. 
  
  Parameters
  ----------
  batch_size: int
      Training batch size.
  test_batch_size: int
      Test/Evaluation batch size (number of users per testing batch).
  train_dataset: Dataset
      Dataset for model training.
  model: Recommender
      The target recommender.
  sampler: Sampler
      The sampler for model training.
  item_serving_size: int, optional
      Test/Evaluation batch size (number of items per testing batch).
  
  Notes  
  -----
  
  The function :code:`train` should be called for model training and evaluation.
class_docstr_tok: ["The","ImplicitModelTrainer","class","implements","logics","for","basic","recommender","training","and","evaluation","using","users","'","*","implicit","feedback","*",".","Parameters","--","--","--","--","--","batch_size",":","int","Training","batch","size",".","test_batch_size",":","int","Test\/Evaluation","batch","size","(","number","of","users","per","testing","batch",")",".","train_dataset",":","Dataset","Dataset","for","model","training",".","model",":","Recommender","The","target","recommender",".","sampler",":","Sampler","The","sampler","for","model","training",".","item_serving_size",":","int",",","optional","Test\/Evaluation","batch","size","(","number","of","items","per","testing","batch",")",".","Notes","--","--","-","The","function",":","code",":","`","train","`","should","be","called","for","model","training","and","evaluation","."]
code: def _score_partial_items(self, user, items):
      if self._item_serving_size is None:
          return self._model.serve(
              {
                  "user_id_input": [user],
                  "item_id_input": np.arange(self._max_item),
              }
          )[0][np.array(items)]
      else:
          return self._model.serve(
              {
                  "user_id_input": [user],
                  "item_id_input": np.array(items),
              }
          )[0]
  
file_path: openrec/openrec/tf1/legacy/implicit_model_trainer.py
imports: from __future__ import print_function
  from tqdm import tqdm
  import math
  from termcolor import colored
  import numpy
  from openrec.tf1.legacy.utils.evaluators import ImplicitEvalManager
  import sys
  import json
  import pickle
label_desc: Use image node_id 4 for calling the ImplicitModelTrainer obj's underlying member method code with example usage: obj._score_partial_items(user, items) and returns: self, self