code: def test_build_task(self):
      config = get_test_task_config()
      task = build_task(config)
      self.assertTrue(isinstance(task, ClassificationTask))
      # check that AMP is disabled by default
      self.assertIsNone(task.amp_args)
  
      # test a valid APEX AMP opt level
      config = copy.deepcopy(config)
      config["amp_args"] = {"opt_level": "O1"}
      task = build_task(config)
      self.assertTrue(isinstance(task, ClassificationTask))
  
      # test a valid Pytorch AMP
      config = copy.deepcopy(config)
      config["amp_args"] = {"amp_type": "pytorch"}
      task = build_task(config)
      self.assertTrue(isinstance(task, ClassificationTask))
  
file_path: ClassyVision/test/manual/tasks_classification_task_amp_test.py
imports: import copy
  import unittest
  import torch
  from classy_vision.tasks import build_task, ClassificationTask
  from classy_vision.trainer import LocalTrainer
  from test.generic.config_utils import get_fast_test_task_config, get_test_task_config
label_desc: Use image node_id 1 for calling the TestClassificationTaskAMP obj's underlying member method code with example usage: obj.test_build_task() without return types