Skip to content

Commit a508331

Browse files
committed
chore: Update backend.py
1 parent 3ea1e0a commit a508331

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/art/serverless/backend.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ async def _delete_checkpoints(
7878
if metric is not None and (max_metric is None or metric > max_metric):
7979
max_metric = metric
8080
max_step = checkpoint.step
81+
print(f"Checkpoint: {checkpoint.step} {metric}")
8182
all_steps.append(checkpoint.step)
82-
steps_to_delete = [step for step in all_steps[:-1] if step != max_step]
83+
steps_to_delete = [step for step in all_steps[1:] if step != max_step]
8384
if steps_to_delete:
8485
await self._client.checkpoints.delete(
8586
model_id=model.id,

0 commit comments

Comments
 (0)