code: def test_training_embedding(self):
      tokenizer = AutoTokenizer.from_pretrained(
          self.tokenizer_name, use_fast=False
      )
      if tokenizer.pad_token is None:
          tokenizer.pad_token = tokenizer.eos_token
      model = AutoAdapterModel.from_config(self.config())
      model.add_embeddings("test", tokenizer)
      self.assertEqual(model.active_embeddings, "test")
      model.add_adapter("test")
      self.add_head(model, "test")
      model.train_adapter("test", train_embeddings=True)
  
      for k, v in filter_parameters(model, "adapters.test.").items():
          self.assertTrue(v.requires_grad, k)
  
      self.assertTrue(model.get_input_embeddings().train)
  
      state_dict_pre = copy.deepcopy(model.state_dict())
  
      train_dataset = self.dataset()
      training_args = TrainingArguments(
          output_dir="./examples",
          do_train=True,
          learning_rate=0.4,
          max_steps=15,
          no_cuda=True,
          per_device_train_batch_size=2,
          label_names=["labels"],
      )
  
      # evaluate
      trainer = Trainer(
          model=model,
          args=training_args,
          train_dataset=train_dataset,
      )
      trainer.train()
  
      self.assertFalse(
          all(
              torch.equal(v1, v2)
              for ((k1, v1), (k2, v2)) in zip(
                  state_dict_pre.items(), model.state_dict().items()
              )
              if "test" in k1
          )
      )
      self.assertTrue(
          all(
              torch.equal(v1, v2)
              for ((k1, v1), (k2, v2)) in zip(
                  state_dict_pre.items(), model.state_dict().items()
              )
              if "test" not in k1
          )
      )
  
file_path: adapters/tests/test_adapter_embeddings.py
imports: import copy
  import tempfile
  import torch
  from adapters import AutoAdapterModel
  from transformers import AutoTokenizer, Trainer, TrainingArguments
  from transformers.testing_utils import require_torch, torch_device
label_desc: Use image node_id 7 for calling the EmbeddingTestMixin obj's underlying member method code with example usage: obj.test_training_embedding() without return types