def test_auto_set_save_adapters(self):
    model = BertForSequenceClassification(BertConfig(hidden_size=32, num_hidden_layers=4, num_attention_heads=4, intermediate_size=37))
    model.add_adapter('adapter')
    model.train_adapter('adapter')
    training_args = TrainingArguments(output_dir='./examples')
    trainer = Trainer(model=model, args=training_args)
    self.assertFalse(trainer.do_save_full_model)
    self.assertTrue(trainer.do_save_adapters)
    self.assertTrue(trainer.do_save_adapter_fusion)
def test_auto_set_save_adapters(self):
    model = BertForSequenceClassification(BertConfig(hidden_size=32, num_hidden_layers=4, num_attention_heads=4, intermediate_size=37))
    model.add_adapter('adapter')
    model.train_adapter('adapter')
    training_args = TrainingArguments(output_dir='./examples')
    trainer = Trainer(model=model, args=training_args)
    self.assertFalse(trainer.do_save_full_model)
    self.assertTrue(trainer.do_save_adapters)
    self.assertTrue(trainer.do_save_adapter_fusion)