docstr: Similar test as before but this time we set skip_params_check_for_root=True in the wrap policy.
  So in this case the root is wrapped even without enough remaining unwrapped params.
docstr_tok: ["Similar","test","as","before","but","this","time","we","set","skip_params_check_for_root=True","in","the","wrap","policy",".","So","in","this","case","the","root","is","wrapped","even","without","enough","remaining","unwrapped","params","."]
code: def test_auto_wrap_skip_root_checks(self):
      """
      Similar test as before but this time we set skip_params_check_for_root=True in the wrap policy.
      So in this case the root is wrapped even without enough remaining unwrapped params.
      """
      with enable_wrap(
          wrapper_cls=FSDP,
          process_group=self.process_group,
          flatten_parameters=False,
      ):
          sequential = nn.Sequential(
              nn.Linear(5, 5),
              nn.Sequential(nn.Linear(5, 5), nn.Linear(5, 5)),
          )
          my_auto_wrap_policy = functools.partial(
              default_auto_wrap_policy,
              min_num_params=60,
              skip_params_check_for_root=True,
          )
          model = auto_wrap(
              sequential, auto_wrap_policy=my_auto_wrap_policy
          )
      assert isinstance(model, FSDP)
      assert isinstance(model.module[0], nn.Linear)
      assert isinstance(model.module[1], FSDP)
      assert isinstance(model.module[1].module[0], nn.Linear)
      assert isinstance(model.module[1].module[1], nn.Linear)
  
imports: import functools
  import os
  import random
  import unittest
  import torch
  import torch.nn
  import torch.nn.functional
  from fairscale.fair_dev.testing.testing import DummyProcessGroup
  from fairscale.nn import FullyShardedDataParallel
  from fairscale.nn import auto_wrap, default_auto_wrap_policy, enable_wrap, wrap
label_desc: Use image node_id 6 for calling the TestAutoWrap obj's underlying member method code with example usage: obj.test_auto_wrap_skip_root_checks() without return types