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_delete_test(self, model, adapter_config, filter_keys):
      model.eval()
  
      name = "test_adapter_" + adapter_config.__class__.__name__
      model.add_adapter(name, config=adapter_config)
      model.set_active_adapters([name])
      model.to(torch_device)
  
      # adapter is correctly added to config
      self.assert_adapter_available(model, name)
  
      # remove the adapter again
      model.delete_adapter(name)
      self.assert_adapter_unavailable(model, name)
  
      # check that weights are available and active
      has_weights = False
      filter_keys = [k.format(name=name) for k in filter_keys]
      for k, v in self.filter_parameters(model, filter_keys).items():
          has_weights = True
      self.assertFalse(has_weights)
  
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 5 for calling the AdapterMethodBaseTestMixin obj's underlying member method code with example usage: obj.run_delete_test(model, adapter_config, filter_keys) without return types