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 test_benchmarking_from_a_consolidated_checkpoint_2(self) -> None:
      with in_temporary_directory() as checkpoint_folder:
          # Run a pre-training in DDP mode and convert to a consolidated checkpoint
          config = self._create_pretraining_config(with_fsdp=True)
          run_integration_test(config)
          sharded_checkpoint_path = os.path.join(
              checkpoint_folder, "checkpoint.torch"
          )
          checkpoint_path = os.path.join(
              checkpoint_folder, "checkpoint.torch"
          )
          CheckpointFormatConverter.sharded_to_consolidated_checkpoint(
              sharded_checkpoint_path, checkpoint_path
          )
  
          # Now, run both DDP and FSDP linear evaluation and compare the traces
          ddp_losses, ddp_accuracies = self.run_benchmarking(
              checkpoint_path, with_fsdp=False
          )
          fsdp_losses, fsdp_accuracies = self.run_benchmarking(
              checkpoint_path, with_fsdp=True
          )
          self.assertEqual(ddp_losses, fsdp_losses)
          self.assertEqual(ddp_accuracies, fsdp_accuracies)
  
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 10 for calling the TestStateCheckpointing obj's underlying member method code with example usage: obj.test_benchmarking_from_a_consolidated_checkpoint_2() without return types