class_docstr:     Callback for valuate the performance of the model.
  Args:
      actor_num_params: The number of parameters of the actor model.
      critic_num_params: The number of parameters of the critic model.
      initial_model_num_params: The number of parameters of the initial model.
      reward_model_num_params: The number of parameters of the reward model.
      enable_grad_checkpoint: Whether to enable gradient checkpointing.
      ignore_episodes: The number of episodes to ignore when calculating the performance.
code: def on_learn_batch_end(self, experience: Experience) -> None:
      if self.disable:
          return
      self.learn_timer.end()
  
      batch_size, seq_len = experience.sequences.shape
  
      self.learn_num_samples += batch_size
  
      # actor forward-backward, 3 means forward(1) + backward(2)
      self.learn_flop += (
          self.actor_num_params
          * batch_size
          * seq_len
          * 2
          * (3 + int(self.enable_grad_checkpoint))
      )
      # critic forward-backward
      self.learn_flop += (
          self.critic_num_params
          * batch_size
          * seq_len
          * 2
          * (3 + int(self.enable_grad_checkpoint))
      )
  
imports: from time import time
  from typing import Optional
  import torch
  import torch.distributed
  from coati.experience_maker import Experience
  from .base import Callback
label_desc: Use image node_id 7 for calling the PerformanceEvaluator obj's underlying member method code with example usage: obj.on_learn_batch_end(experience) without return types