class_docstr: Check that loading a checkpoint during training works
  Check that loading a checkpoint for benchmarking works
class_docstr_tok: ["Check","that","loading","a","checkpoint","during","training","works","Check","that","loading","a","checkpoint","for","benchmarking","works"]
code: def run_benchmarking_preemption_test(
      self,
      checkpoint_path: str,
      with_fsdp: bool,
      with_eval_mlp: bool,
      num_gpu: int = 2,
  ):
      with in_temporary_directory() as temp_dir:
          config = self._create_benchmark_config(
              checkpoint_path,
              with_fsdp=with_fsdp,
              with_eval_mlp=with_eval_mlp,
              num_gpu=num_gpu,
          )
          config.CHECKPOINT.DIR = temp_dir
          results = run_integration_test(config)
          initial_losses = results.get_losses()
  
          results.clean_final_checkpoint()
          results.clean_logs()
  
          results = run_integration_test(config)
          restart_losses = results.get_losses()
  
          print("INITIAL:", initial_losses)
          print("RESTART:", restart_losses)
  
          self.assertEqual(initial_losses[5:], restart_losses)
  
imports: import os
  import unittest
  from vissl.config.attr_dict import AttrDict
  from vissl.utils.checkpoint import CheckpointFormatConverter
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.test_utils import gpu_test, in_temporary_directory, run_integration_test
label_desc: Use image node_id 13 for calling the TestStateCheckpointing obj's underlying member method code with example usage: obj.run_benchmarking_preemption_test(checkpoint_path, with_fsdp, with_eval_mlp, num_gpu) without return types