class_docstr: Unit and integration tests to check that the behavior of DINO is correct
  under FSDP.
class_docstr_tok: ["Unit","and","integration","tests","to","check","that","the","behavior","of","DINO","is","correct","under","FSDP","."]
code: def test_pretraining_with_activation_checkpointing(self) -> None:
      config_ref = self._create_dino_pretraining_config(
          with_fsdp=True,
          with_mixed_precision=True,
          with_multicrop=True,
          gpu_count=2,
      )
      config_mlp = self._create_dino_pretraining_config(
          with_fsdp=True,
          with_mixed_precision=True,
          with_multicrop=True,
          gpu_count=2,
          with_mlp_checkpoints=True,
      )
      config_blk = self._create_dino_pretraining_config(
          with_fsdp=True,
          with_mixed_precision=True,
          with_multicrop=True,
          gpu_count=2,
          with_block_checkpoints=True,
      )
      losses_ref = self.run_config(config_ref)
      losses_mlp = self.run_config(config_mlp)
      losses_blk = self.run_config(config_blk)
      print(losses_ref)
      print(losses_mlp)
      print(losses_blk)
      self.assertAlmostEqual(losses_ref[-1], losses_mlp[-1], places=4)
      self.assertAlmostEqual(losses_ref[-1], losses_blk[-1], places=4)
  
imports: import os
  import unittest
  import torch
  import torch.multiprocessing
  import torch.optim
  from torch.nn.parallel import DistributedDataParallel
  from vissl.models import build_model
  from vissl.models.heads.dino_head import DINOHead, DINOHeadFSDP
  from vissl.utils.checkpoint import CheckpointFormatConverter, DINOCheckpointUtils
  from vissl.utils.fsdp_utils import fsdp_wrapper
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.misc import set_torch_seed
  from vissl.utils.test_utils import gpu_test, in_temporary_directory, init_distributed_on_file, run_integration_test, with_temp_files
label_desc: Use image node_id 10 for calling the TestDINO obj's underlying member method code with example usage: obj.test_pretraining_with_activation_checkpointing() without return types