Skip to content

Commit

Permalink
set max_steps and save limit so we have the checkpoint when testing r…
Browse files Browse the repository at this point in the history
…esuming
  • Loading branch information
winglian committed Nov 15, 2023
1 parent e70edd9 commit ac88f7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/test_resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def test_resume_qlora(self, temp_dir):
"learning_rate": 0.00001,
"optimizer": "adamw_torch",
"lr_scheduler": "cosine",
"save_steps": 10,
"save_steps": 30,
"save_total_limit": 5,
"max_steps": 40,
}
)
if is_torch_bf16_gpu_available():
Expand Down Expand Up @@ -90,4 +92,4 @@ def test_resume_qlora(self, temp_dir):
)
pattern = r"first_step\s+(\d+)"
first_steps = int(re.findall(pattern, res.stdout)[0])
assert first_steps == 11
assert first_steps == 31

0 comments on commit ac88f7a

Please sign in to comment.