code: def test_dls_without_overflow():
      x, y = _init_dataset()
      model = _train_with_dls(x, y)
      for name, param in model.named_parameters():
          if param.requires_grad:
              print(name, param.data)
              if name == "linear.weight":
                  assert (param.data.item() - 2) <= 0.05
              if name == "linear.bias":
                  assert (param.data.item() - 1) <= 0.03
  
file_path: fairscale/tests/experimental/optim/test_dynamic_loss_scaler.py
imports: import numpy
  import torch
  import torch.nn
  import torch.optim
  from fairscale.experimental.optim.dynamic_loss_scaler import DynamicLossScaler
label_desc: Use image node_id 3 for calling a global function with example usage: test_dls_without_overflow() without return types