Skip to content

Commit

Permalink
feat: add job cost to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-malo committed Jun 28, 2024
1 parent af48070 commit 93d3b2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/dry_run_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async def main():
print(f"Dataset tokens: {dry_run_job.data_tokens}")
print(f"Epochs number: {dry_run_job.epochs}")
print(f"Expected duration: {dry_run_job.expected_duration_seconds}")
print(f"Cost: {dry_run_job.cost} {dry_run_job.cost_currency}")


if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions src/mistralai/models/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class JobMetadata(BaseModel):
train_tokens: int
epochs: float
expected_duration_seconds: Optional[int]
cost: Optional[float] = None
cost_currency: Optional[str] = None


class Job(BaseModel):
Expand Down

0 comments on commit 93d3b2b

Please sign in to comment.