Skip to content

Commit d009791

Browse files
feat(cli): show fine-tune checkpoint artifact ids
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
1 parent 2fb5e59 commit d009791

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/together/lib/cli/api/fine_tuning/list_checkpoints.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ async def list_checkpoints(
2525
title="Checkpoints",
2626
empty_message=f"No checkpoints found for job {fine_tune_id}",
2727
)
28-
table.add_column("ID")
28+
table.add_column("Download ID")
2929
table.add_column("Timestamp")
30+
table.add_column("Artifact ID")
31+
table.add_column("Revision ID")
3032
table.add_primary_column("Type")
3133

3234
for checkpoint in checkpoints.data:
@@ -35,7 +37,13 @@ async def list_checkpoints(
3537
if "intermediate" in checkpoint.checkpoint_type.lower()
3638
else fine_tune_id
3739
)
38-
table.add_row(name, format_timestamp(checkpoint.created_at), checkpoint.checkpoint_type)
40+
table.add_row(
41+
name,
42+
format_timestamp(checkpoint.created_at),
43+
checkpoint.object_id or "",
44+
checkpoint.object_revision_id or "",
45+
checkpoint.checkpoint_type,
46+
)
3947

4048
console.print(table)
4149
if checkpoints.data:

tests/cli/test_fine_tuning.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@
6767

6868
_FT_CHECKPOINT = {
6969
"checkpoint_type": "intermediate",
70+
"checkpoint": "model",
7071
"created_at": "2024-01-01T00:00:00Z",
72+
"object_id": "ml-checkpoint",
73+
"object_revision_id": "rv-checkpoint",
7174
"path": "/p",
7275
"step": 5,
7376
}
@@ -348,6 +351,8 @@ def test_list_checkpoints_table(self, respx_mock: MockRouter, cli_runner: CliRun
348351
result = cli_runner.invoke(["fine-tuning", "list-checkpoints", "ft-1"])
349352
assert result.exit_code == 0
350353
assert "ft-1:5" in result.output
354+
assert "ml-checkpoint" in result.output
355+
assert "rv-checkpoint" in result.output
351356
assert "intermediate" in result.output
352357

353358
@pytest.mark.respx(base_url=base_url)

0 commit comments

Comments
 (0)