docstr: Test that the optimizer is correctly instantiated and that a task can run
docstr_tok: ["Test","that","the","optimizer","is","correctly","instantiated","and","that","a","task","can","run"]
code: def test_oss_sgd(self):
      """
      Test that the optimizer is correctly instantiated and that a task can run
      """
      num_processes = 2
  
      cmd = get_distributed_launch_cmd(
          num_processes=num_processes,
          trainer_path=f"{Path(__file__).parent.absolute()}/../classy_train.py",
          config_path=self.config_path,
      )
  
      result = subprocess.run(cmd, shell=True)
      self.assertEqual(result.returncode, 0)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import json
  import logging
  import os
  import subprocess
  import tempfile
  import unittest
  from pathlib import Path
  import classy_vision.optim
  import torch
  import torch.distributed
  from classy_vision.optim.zero import ZeRO
  from test.generic.config_utils import get_distributed_launch_cmd, get_fast_test_task_config
  from test.generic.optim_test_util import TestOptimizer
label_desc: Use image node_id 4 for calling the TestOptimizerStateSharding obj's underlying member method code with example usage: obj.test_oss_sgd() without return types