class_docstr: The trainer for Disjoint LinUCB Contextual Bandit model.
  The model estimates a ridge regression (linear) and only supports dense features.
  
  Args:
      policy: The policy to be trained. Its scorer has to be DisjointLinearRegressionUCB
class_docstr_tok: ["The","trainer","for","Disjoint","LinUCB","Contextual","Bandit","model",".","The","model","estimates","a","ridge","regression","(","linear",")","and","only","supports","dense","features",".","Args",":","policy",":","The","policy","to","be","trained",".","Its","scorer","has","to","be","DisjointLinearRegressionUCB"]
code: def __init__(
      self,
      policy: Policy,
      automatic_optimization: bool = False,  # turn off automatic_optimization because we are updating parameters manually
      *args,
      **kwargs,
  ):
      super().__init__(
          automatic_optimization=automatic_optimization, *args, **kwargs
      )
      assert isinstance(
          policy.scorer, DisjointLinearRegressionUCB
      ), "DisjointLinUCBTrainer requires the policy scorer to be DisjointLinearRegressionUCB"
      self.scorer = policy.scorer
      self.num_arms = policy.scorer.num_arms
  
file_path: ReAgent/reagent/training/cb/disjoint_linucb_trainer.py
imports: import logging
  from typing import List, Optional
  import torch
  from reagent.core.configuration import resolve_defaults
  from reagent.core.types import CBInput
  from reagent.gym.policies.policy import Policy
  from reagent.models.disjoint_linucb_predictor import DisjointLinearRegressionUCB
  from reagent.training.cb.base_trainer import BaseCBTrainerWithEval
label_desc: Use image node_id 1 to create a new DisjointLinUCBTrainer object from inherited base classes: BaseCBTrainerWithEval with example: obj = DisjointLinUCBTrainer(policy, automatic_optimization)