docstr: `actor_dqn` is the actor module wrapped in the DQN predictor wrapper.
  This helps putting the actor in places where DQN predictor wrapper is expected.
  If the policy is greedy, then this wrapper would work.
docstr_tok: ["`","actor_dqn","`","is","the","actor","module","wrapped","in","the","DQN","predictor","wrapper",".","This","helps","putting","the","actor","in","places","where","DQN","predictor","wrapper","is","expected",".","If","the","policy","is","greedy",",","then","this","wrapper","would","work","."]
code: def build_serving_modules(
      self,
      trainer_module: ReAgentLightningModule,
      normalization_data_map: Dict[str, NormalizationData],
  ):
      """
      `actor_dqn` is the actor module wrapped in the DQN predictor wrapper.
      This helps putting the actor in places where DQN predictor wrapper is expected.
      If the policy is greedy, then this wrapper would work.
      """
      assert isinstance(trainer_module, DiscreteCRRTrainer)
      serving_modules = {
          "default_model": self.build_actor_module(
              trainer_module, normalization_data_map
          ),
          "dqn": self._build_dqn_module(
              trainer_module.q1_network, normalization_data_map
          ),
          "actor_dqn": self._build_dqn_module(
              ActorDQN(trainer_module.actor_network),
              normalization_data_map,
          ),
      }
      if len(self.action_names) == 2:
          serving_modules.update(
              {
                  "binary_difference_scorer": self._build_binary_difference_scorer(
                      ActorDQN(trainer_module.actor_network),
                      normalization_data_map,
                  ),
              }
          )
      if self.eval_parameters.calc_cpe_in_training:
          serving_modules.update(
              {
                  "reward_model": self.build_reward_module(
                      trainer_module, normalization_data_map
                  )
              }
          )
      return serving_modules
  
imports: import logging
  from typing import Dict, Optional
  import reagent.core.types
  import torch
  from reagent.core.dataclasses import dataclass, field
  from reagent.core.parameters import EvaluationParameters, NormalizationData, NormalizationKey, param_hash
  from reagent.evaluation.evaluator import get_metrics_to_score
  from reagent.gym.policies.policy import Policy
  from reagent.gym.policies.predictor_policies import create_predictor_policy_from_model
  from reagent.model_managers.discrete_dqn_base import DiscreteDQNBase
  from reagent.models.base import ModelBase
  from reagent.net_builder.discrete_actor.fully_connected import FullyConnected
  from reagent.net_builder.discrete_dqn.dueling import Dueling
  from reagent.net_builder.discrete_dqn.fully_connected import FullyConnected
  from reagent.net_builder.unions import DiscreteActorNetBuilder__Union, DiscreteDQNNetBuilder__Union
  from reagent.prediction.cfeval.predictor_wrapper import BanditRewardNetPredictorWrapper
  from reagent.reporting.discrete_crr_reporter import DiscreteCRRReporter
  from reagent.training import CRRTrainerParameters, DiscreteCRRTrainer, ReAgentLightningModule
  from reagent.workflow.types import RewardOptions
label_desc: Use image node_id 8 for calling the DiscreteCRR obj's underlying member method code with example usage: obj.build_serving_modules(trainer_module, normalization_data_map) and returns: serving_modules