class_docstr: ---------------------------------------------------------------------------
  Testing ViT individual blocks
  ---------------------------------------------------------------------------
code: def test_vit_fsdp_vs_ddp_convergence(self) -> None:
      with_amp = False
      with with_temp_files(count=2) as file_names:
          self._run_vit_training_loop(
              with_fsdp=True,
              with_amp=with_amp,
              output_file_name=file_names[0],
          )
          self._run_vit_training_loop(
              with_fsdp=False,
              with_amp=with_amp,
              output_file_name=file_names[1],
          )
  
          results = []
          for file_name in file_names:
              with open(file_name, "rb") as f:
                  result = pickle.load(f)
                  results.append(result)
  
          for r0, r1 in zip(results[0], results[1]):
              print(r0, "VS", r1)
          self.assertEqual(results[0], results[1], "DDP vs FSDP")
  
imports: import contextlib
  import pickle
  import unittest
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.optim
  from torch.nn.parallel import DistributedDataParallel
  from vissl.config import AttrDict
  from vissl.models import build_model
  from vissl.models.heads import DINOHead
  from vissl.models.heads.dino_head import DINOHeadFSDP
  from vissl.models.trunks.vision_transformer import Block, PatchEmbed
  from vissl.utils.fsdp_utils import fsdp_wrapper, is_valid_fsdp_model
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.misc import torch_version
  from vissl.utils.test_utils import gpu_test, init_distributed_on_file, with_temp_files
label_desc: Use image node_id 8 for calling the TestVitFSDP obj's underlying member method code with example usage: obj.test_vit_fsdp_vs_ddp_convergence() without return types