class_docstr: Provides base test running methods for testing an adapter method implementation.
class_docstr_tok: ["Provides","base","test","running","methods","for","testing","an","adapter","method","implementation","."]
code: def run_leave_out_test(self, model, adapter_config, leave_out):
      model.eval()
  
      adapter_config = adapter_config.replace(leave_out=leave_out)
      name = "test_adapter_" + adapter_config.__class__.__name__
      model.add_adapter(name, config=adapter_config)
      model.set_active_adapters([name])
  
      # adapter is correctly added to config
      self.assert_adapter_available(model, name)
  
      adapter = model.get_adapter(name)
  
      self.assertNotEqual(len(adapter), 0)
      found_layers = list(adapter.keys())
      for layer in leave_out:
          self.assertNotIn(layer, found_layers)
  
      model.delete_adapter(name)
  
imports: import copy
  import os
  import tempfile
  import torch
  import adapters
  from adapters import ADAPTER_MODEL_MAPPING, AdapterSetup, AdapterTrainer, AutoAdapterModel
  from adapters.heads import CausalLMHead
  from adapters.utils import WEIGHTS_NAME
  from adapters.wrappers import load_model
  from transformers import TrainingArguments
  from transformers.testing_utils import require_torch, torch_device
label_desc: Use image node_id 3 for calling the AdapterMethodBaseTestMixin obj's underlying member method code with example usage: obj.run_leave_out_test(model, adapter_config, leave_out) without return types