class_docstr: Here we also overwrite some of the tests of test_modeling_common.py, as DPT does not use input_ids, inputs_embeds,
  attention_mask and seq_length.
class_docstr_tok: ["Here","we","also","overwrite","some","of","the","tests","of","test_modeling_common.py",",","as","DPT","does","not","use","input_ids",",","inputs_embeds",",","attention_mask","and","seq_length","."]
code: def test_training(self):
      for model_class in self.all_model_classes:
          if model_class.__name__ == "DPTForDepthEstimation":
              continue
  
          (
              config,
              inputs_dict,
          ) = self.model_tester.prepare_config_and_inputs_for_common()
          config.return_dict = True
  
          if model_class in get_values(MODEL_MAPPING):
              continue
  
          model = model_class(config)
          model.to(torch_device)
          model.train()
          inputs = self._prepare_for_class(
              inputs_dict, model_class, return_labels=True
          )
          loss = model(**inputs).loss
          loss.backward()
  
imports: import inspect
  import unittest
  from transformers import DPTConfig
  from transformers.file_utils import is_torch_available, is_vision_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_torch, require_vision, slow, torch_device
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
label_desc: Use image node_id 9 for calling the DPTModelTest obj's underlying member method code with example usage: obj.test_training() without return types