-
Notifications
You must be signed in to change notification settings - Fork 15
MOSH-2458: Add GET /v1/fine-tunes/{id}/metrics endpoint #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
62f42f2
Add GET /v1/fine-tunes/{id}/metrics endpoint
artek0chumak 5706fcb
Add 404 response to GET /v1/fine-tunes/{id}/metrics
artek0chumak 0d8c7c2
Fix metrics response example and cURL sample
artek0chumak c235ac3
Replace 'rows' with 'metrics' in descriptions to reduce internal term…
artek0chumak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3332,6 +3332,87 @@ paths: | |
| description: Invalid request parameters. | ||
| '404': | ||
| description: Fine-tune ID not found. | ||
| /fine-tunes/{id}/metrics: | ||
| get: | ||
| tags: ['Fine-tuning'] | ||
| summary: Get metrics | ||
| description: > | ||
| Retrieves recorded training metrics for a fine-tuning job in chronological order. | ||
| All filter fields are optional — omit the body or send `{}` to retrieve all metrics. | ||
| x-codeSamples: | ||
| - lang: Shell | ||
| label: cURL | ||
| source: | | ||
| curl -X GET "https://api.together.xyz/v1/fine-tunes/ft-id/metrics" \ | ||
| -H "Authorization: Bearer $TOGETHER_API_KEY" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "global_step_from": 0, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we probably can add time filters to example too |
||
| "global_step_to": 500 | ||
| }' | ||
| parameters: | ||
| - name: id | ||
| in: path | ||
| required: true | ||
| schema: | ||
| description: Fine-tune job ID. A string that starts with `ft-`. | ||
| type: string | ||
| requestBody: | ||
| required: false | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| global_step_from: | ||
| type: integer | ||
| format: int64 | ||
| description: Return only metrics with global_step >= this value. | ||
| example: 0 | ||
| global_step_to: | ||
| type: integer | ||
| format: int64 | ||
| description: Return only metrics with global_step <= this value. | ||
| example: 500 | ||
| logged_at_from: | ||
| type: string | ||
| format: date-time | ||
| description: Return only metrics logged at or after this ISO-8601 timestamp. | ||
| example: "2024-01-01T00:00:00Z" | ||
| logged_at_to: | ||
| type: string | ||
| format: date-time | ||
| description: Return only metrics logged at or before this ISO-8601 timestamp. | ||
| example: "2024-01-01T12:00:00Z" | ||
| responses: | ||
| '200': | ||
| description: List of metrics snapshots in chronological order. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| metrics: | ||
| type: array | ||
| items: | ||
| type: object | ||
| additionalProperties: | ||
| type: number | ||
| description: A flat dictionary of scalar metric values. | ||
| example: | ||
| metrics: | ||
| - train/loss: 0.5 | ||
| train/learning_rate: 0.0001 | ||
| train/global_step: 7 | ||
| - train/loss: 0.45 | ||
| train/learning_rate: 0.00009 | ||
| train/global_step: 14 | ||
| '400': | ||
| description: Invalid request — bad JSON body or missing job ID. | ||
| '404': | ||
| description: Fine-tune job not found. | ||
| '500': | ||
| description: Internal server error — failed to retrieve metrics. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 404 missing |
||
| /fine-tunes/models/supported: | ||
| get: | ||
| tags: ['Fine-tuning'] | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.