Skip to content

Commit

Permalink
remove parallel grad checkpointing test
Browse files Browse the repository at this point in the history
  • Loading branch information
calpt committed Nov 25, 2024
1 parent 8421f63 commit 94df2fe
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 31 deletions.
13 changes: 0 additions & 13 deletions tests/methods/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,16 +422,3 @@ def adapter_setup_fn(model):
model.adapter_to("adapter1", torch_device)

self._run_gradient_checkpointing_test_helper(adapter_setup_fn)

def run_gradient_checkpointing_test_parallel_adapters(self, adapter_config):
def adapter_setup_fn(model):
model.add_adapter("adapter1", config=adapter_config)
model.add_adapter("adapter2", config=adapter_config)
self.add_head(model, "adapter1")
self.add_head(model, "adapter2")
model.active_adapters = ac.Parallel("adapter1", "adapter2")
model.train_adapter(ac.Parallel("adapter1", "adapter2"))
model.adapter_to("adapter1", torch_device)
model.adapter_to("adapter2", torch_device)

self._run_gradient_checkpointing_test_helper(adapter_setup_fn)
3 changes: 0 additions & 3 deletions tests/methods/test_ia3.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ def test_reset_ia3(self):

def test_ia3_gradient_checkpointing_single_adapter(self):
self.run_gradient_checkpointing_single_adapter_test(IA3Config())

def test_ia3_gradient_checkpointing_parallel_adapters(self):
self.run_gradient_checkpointing_test_parallel_adapters(IA3Config())
3 changes: 0 additions & 3 deletions tests/methods/test_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,3 @@ def test_reset_lora(self):

def test_lora_gradient_checkpointing_single_adapter(self):
self.run_gradient_checkpointing_single_adapter_test(LoRAConfig())

def test_lora_gradient_checkpointing_parallel_adapters(self):
self.run_gradient_checkpointing_test_parallel_adapters(LoRAConfig())
3 changes: 0 additions & 3 deletions tests/methods/test_prefix_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,3 @@ def test_prefix_tuning_generate(self):

def test_prefix_tuning_gradient_checkpointing_single_adapter(self):
self.run_gradient_checkpointing_single_adapter_test(PrefixTuningConfig())

def test_prefix_tuning_gradient_checkpointing_parallel_adapters(self):
self.run_gradient_checkpointing_test_parallel_adapters(PrefixTuningConfig())
3 changes: 0 additions & 3 deletions tests/methods/test_prompt_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,3 @@ def test_train_prompt_tuning(self):

def test_prompt_tuning_gradient_checkpointing_single_adapter(self):
self.run_gradient_checkpointing_single_adapter_test(PromptTuningConfig(prompt_length=10))

def test_prompt_tuning_gradient_checkpointing_parallel_adapters(self):
self.run_gradient_checkpointing_test_parallel_adapters(PromptTuningConfig(prompt_length=10))
3 changes: 0 additions & 3 deletions tests/methods/test_reft.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,3 @@ def test_train_loreft(self):

def test_reft_gradient_checkpointing_single_adapter(self):
self.run_gradient_checkpointing_single_adapter_test(LoReftConfig())

def test_reft_gradient_checkpointing_parallel_adapters(self):
self.run_gradient_checkpointing_test_parallel_adapters(LoReftConfig())
3 changes: 0 additions & 3 deletions tests/methods/test_unipelt.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,3 @@ def test_output_adapter_gating_scores_unipelt(self):

def test_unipelt_gradient_checkpointing_single_adapter(self):
self.run_gradient_checkpointing_single_adapter_test(UniPELTConfig())

def test_unipelt_gradient_checkpointing_parallel_adapters(self):
self.run_gradient_checkpointing_test_parallel_adapters(UniPELTConfig())

0 comments on commit 94df2fe

Please sign in to comment.