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_make_experience_end(self, experience: Experience) -> None:
      if self.disable:
          return
      self.make_experience_timer.end()
  
      batch_size, seq_len = experience.sequences.shape
  
      self.make_experience_num_samples += batch_size
  
      # actor generate
      num_actions = experience.action_mask.size(1)
      input_len = seq_len - num_actions
      total_seq_len = (input_len + seq_len - 1) * num_actions / 2
      self.make_experience_flop += (
          self.actor_num_params * batch_size * total_seq_len * 2
      )
      # actor forward
      self.make_experience_flop += (
          self.actor_num_params * batch_size * seq_len * 2
      )
      # critic forward
      self.make_experience_flop += (
          self.critic_num_params * batch_size * seq_len * 2
      )
      # initial model forward
      self.make_experience_flop += (
          self.initial_model_num_params * batch_size * seq_len * 2
      )
      # reward model forward
      self.make_experience_flop += (
          self.reward_model_num_params * batch_size * seq_len * 2
      )
  
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 5 for calling the PerformanceEvaluator obj's underlying member method code with example usage: obj.on_make_experience_end(experience) without return types