class_docstr: Test the Regnet FSDP model in comparison with the DDP Regnet
  to verify that both converge to the same losses
class_docstr_tok: ["Test","the","Regnet","FSDP","model","in","comparison","with","the","DDP","Regnet","to","verify","that","both","converge","to","the","same","losses"]
code: def test_fsdp_integration(self) -> None:
      fsdp_losses_1 = self.run_pretraining(
          with_fsdp=True,
          with_activation_checkpointing=True,
          with_mixed_precision=False,
          force_sync_all_gather=True,
      )
      fsdp_losses_2 = self.run_pretraining(
          with_fsdp=True,
          with_activation_checkpointing=False,
          with_mixed_precision=False,
          force_sync_all_gather=False,
      )
      fsdp_losses_3 = self.run_pretraining(
          with_fsdp=True,
          with_activation_checkpointing=False,
          with_mixed_precision=False,
          auto_wrap_threshold=100,
          force_sync_all_gather=False,
      )
      ddp_losses = self.run_pretraining(
          with_fsdp=False,
          with_activation_checkpointing=False,
          with_mixed_precision=False,
      )
      self.assertEqual(ddp_losses, fsdp_losses_1)
      self.assertEqual(ddp_losses, fsdp_losses_2)
      self.assertEqual(ddp_losses, fsdp_losses_3)
  
imports: import os
  import unittest
  import numpy
  import torch
  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 8 for calling the TestRegnetFSDPIntegration obj's underlying member method code with example usage: obj.test_fsdp_integration() without return types