Skip to content

Commit 47da154

Browse files
committed
add test
1 parent c84eb32 commit 47da154

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/recipes/test_lora_dpo_distributed.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ def test_training_state_on_resume(
143143
resumed_loss_values, expected_loss_values, rtol=1e-5, atol=1e-5
144144
)
145145

146+
@pytest.mark.parametrize("save_adapter_weights_only", [False, True])
146147
@gpu_test(gpu_count=2)
147148
@pytest.mark.integration_test
148149
def test_training_state_on_resume_with_async_checkpointing(
149-
self, tmpdir, monkeypatch
150+
self, tmpdir, monkeypatch, save_adapter_weights_only
150151
):
151152
"""Test whether the recipe state is correctly updated on resume. Since this
152153
is model agnostic, we should run this on the small model only. The test
@@ -183,7 +184,7 @@ def test_training_state_on_resume_with_async_checkpointing(
183184
enable_async_checkpointing=True \
184185
tokenizer.path=/tmp/test-artifacts/tokenizer.model \
185186
tokenizer.prompt_template=null \
186-
save_adapter_weights_only={False} \
187+
save_adapter_weights_only={save_adapter_weights_only} \
187188
metric_logger.filename={log_file} \
188189
enable_activation_checkpointing=True \
189190
enable_activation_offloading=False \

0 commit comments

Comments
 (0)