docstr: Test to ensure with auto wrap, we wrap child modules correctly based on the min_num_params.
  ``nn.Linear(5, 5)`` does not exceed the bucket size, but combined they do.
  Root is not wrapped given there are not enough unwrapped params left and skip_params_check_for_root
  is not set.
docstr_tok: ["Test","to","ensure","with","auto","wrap",",","we","wrap","child","modules","correctly","based","on","the","min_num_params",".","``","nn.Linear","(","5",",","5",")","``","does","not","exceed","the","bucket","size",",","but","combined","they","do",".","Root","is","not","wrapped","given","there","are","not","enough","unwrapped","params","left","and","skip_params_check_for_root","is","not","set","."]
code: def test_auto_wrap(self):
      """
      Test to ensure with auto wrap, we wrap child modules correctly based on the min_num_params.
      ``nn.Linear(5, 5)`` does not exceed the bucket size, but combined they do.
      Root is not wrapped given there are not enough unwrapped params left and skip_params_check_for_root
      is not set.
      """
      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
          )
          model = auto_wrap(
              sequential, auto_wrap_policy=my_auto_wrap_policy
          )
      assert isinstance(model, nn.Sequential)
      assert isinstance(model[0], nn.Linear)
      assert isinstance(model[1], FSDP)
      assert isinstance(model[1].module[0], nn.Linear)
      assert isinstance(model[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 5 for calling the TestAutoWrap obj's underlying member method code with example usage: obj.test_auto_wrap() without return types