class_docstr:     Detached Trainer for PPO algorithm
  Args:
      strategy (Strategy): the strategy to use for training
      model (str) : for actor / critic init
      pretrained (str) : for actor / critic init
      lora_rank (int) : for actor / critic init
      train_batch_size (int, defaults to 8): the batch size to use for training
      train_batch_size (int, defaults to 8): the batch size to use for training
      buffer_limit (int, defaults to 0): the max_size limitation of replay buffer
      buffer_cpu_offload (bool, defaults to True): whether to offload replay buffer to cpu
      eps_clip (float, defaults to 0.2): the clip coefficient of policy loss
      value_clip (float, defaults to 0.4): the clip coefficient of value loss
      experience_batch_size (int, defaults to 8): the batch size to use for experience generation
      max_epochs (int, defaults to 1): the number of epochs of training process
      dataloader_pin_memory (bool, defaults to True): whether to pin memory for data loader
      callbacks (List[Callback], defaults to []): the callbacks to call during training process
      generate_kwargs (dict, optional): the kwargs to use while model generating
class_docstr_tok: ["Detached","Trainer","for","PPO","algorithm","Args",":","strategy","(","Strategy",")",":","the","strategy","to","use","for","training","model","(","str",")",":","for","actor","\/","critic","init","pretrained","(","str",")",":","for","actor","\/","critic","init","lora_rank","(","int",")",":","for","actor","\/","critic","init","train_batch_size","(","int",",","defaults","to","8",")",":","the","batch","size","to","use","for","training","train_batch_size","(","int",",","defaults","to","8",")",":","the","batch","size","to","use","for","training","buffer_limit","(","int",",","defaults","to","0",")",":","the","max_size","limitation","of","replay","buffer","buffer_cpu_offload","(","bool",",","defaults","to","True",")",":","whether","to","offload","replay","buffer","to","cpu","eps_clip","(","float",",","defaults","to","0.2",")",":","the","clip","coefficient","of","policy","loss","value_clip","(","float",",","defaults","to","0.4",")",":","the","clip","coefficient","of","value","loss","experience_batch_size","(","int",",","defaults","to","8",")",":","the","batch","size","to","use","for","experience","generation","max_epochs","(","int",",","defaults","to","1",")",":","the","number","of","epochs","of","training","process","dataloader_pin_memory","(","bool",",","defaults","to","True",")",":","whether","to","pin","memory","for","data","loader","callbacks","(","List","[","Callback","]",",","defaults","to","[","]",")",":","the","callbacks","to","call","during","training","process","generate_kwargs","(","dict",",","optional",")",":","the","kwargs","to","use","while","model","generating"]
code: def strategy_save_critic(
      self, path: str, only_rank0: bool = False
  ) -> None:
      self.strategy.save_model(self.critic, path, only_rank0)
  
imports: from typing import Callable, Dict, List, Tuple
  import ray
  import torch
  from coati.experience_maker import Experience
  from coati.models.base import Actor, Critic
  from coati.models.loss import PolicyLoss, ValueLoss
  from coati.trainer.strategies import GeminiStrategy, LowLevelZeroStrategy, Strategy
  from torch.optim import Adam
  from colossalai.nn.optimizer import HybridAdam
  from .callbacks import TrainerCallback, TrainerPerformanceEvaluator
  from .detached_trainer_base import DetachedTrainer
  from .lora_constructor import LoRAConstructor
  from .utils import get_model_numel, get_rank, set_dist_env, state_dict_to
label_desc: Use image node_id 5 for calling the DetachedPPOTrainer obj's underlying member method code with example usage: obj.strategy_save_critic(path, only_rank0) without return types