class_docstr: The base class for Contextual Bandit models. A minimal implementation of a specific model requires providing a specific
      implementation for only the cb_training_step() method.
  The main functionality implemented in this base class is the integration of Offline Evaluation into the training loop.
class_docstr_tok: ["The","base","class","for","Contextual","Bandit","models",".","A","minimal","implementation","of","a","specific","model","requires","providing","a","specific","implementation","for","only","the","cb_training_step","(",")","method",".","The","main","functionality","implemented","in","this","base","class","is","the","integration","of","Offline","Evaluation","into","the","training","loop","."]
docstr: Attach an Offline Evaluation module. It will kleep track of reward during training and filter training batches.
docstr_tok: ["Attach","an","Offline","Evaluation","module",".","It","will","kleep","track","of","reward","during","training","and","filter","training","batches","."]
code: def attach_eval_module(self, eval_module: BaseOfflineEval) -> None:
      """
      Attach an Offline Evaluation module. It will kleep track of reward during training and filter training batches.
      """
      self.eval_module = eval_module
  
imports: import logging
  from abc import ABC, abstractmethod
  from typing import final, Optional
  import torch
  from reagent.core.types import CBInput
  from reagent.core.utils import get_rank
  from reagent.evaluation.cb.base_evaluator import BaseOfflineEval
  from reagent.models.cb_base_model import UCBBaseModel
  from reagent.models.mab import MABBaseModel
  from reagent.training.cb.utils import add_chosen_arm_features, get_model_actions
  from reagent.training.reagent_lightning_module import ReAgentLightningModule
  from torchrec.metrics.metric_module import RecMetricModule
label_desc: Use image node_id 3 for calling the BaseCBTrainerWithEval obj's underlying member method code with example usage: obj.attach_eval_module(eval_module) without return types