Skip to content

Commit 8a6ac62

Browse files
authored
feat: add job cost to metadata (#112)
1 parent 5fdc57c commit 8a6ac62

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

examples/dry_run_job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ async def main():
3232
print(f"Dataset tokens: {dry_run_job.data_tokens}")
3333
print(f"Epochs number: {dry_run_job.epochs}")
3434
print(f"Expected duration: {dry_run_job.expected_duration_seconds}")
35+
print(f"Cost: {dry_run_job.cost} {dry_run_job.cost_currency}")
3536

3637

3738
if __name__ == "__main__":

src/mistralai/models/jobs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class JobMetadata(BaseModel):
3232
train_tokens: int
3333
epochs: float
3434
expected_duration_seconds: Optional[int]
35+
cost: Optional[float] = None
36+
cost_currency: Optional[str] = None
3537

3638

3739
class Job(BaseModel):

0 commit comments

Comments
 (0)