Merge branch 'main' into update-links-android-demo-app

This commit is contained in:
Jorge 2025-07-09 15:30:21 +02:00 committed by GitHub
commit a1100b6d62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 118 additions and 22 deletions

View file

@ -11132,8 +11132,38 @@
"title": "Trace" "title": "Trace"
}, },
"Checkpoint": { "Checkpoint": {
"description": "Checkpoint created during training runs", "type": "object",
"title": "Checkpoint" "properties": {
"identifier": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"epoch": {
"type": "integer"
},
"post_training_job_id": {
"type": "string"
},
"path": {
"type": "string"
},
"training_metrics": {
"$ref": "#/components/schemas/PostTrainingMetric"
}
},
"additionalProperties": false,
"required": [
"identifier",
"created_at",
"epoch",
"post_training_job_id",
"path"
],
"title": "Checkpoint",
"description": "Checkpoint created during training runs"
}, },
"PostTrainingJobArtifactsResponse": { "PostTrainingJobArtifactsResponse": {
"type": "object", "type": "object",
@ -11156,6 +11186,31 @@
"title": "PostTrainingJobArtifactsResponse", "title": "PostTrainingJobArtifactsResponse",
"description": "Artifacts of a finetuning job." "description": "Artifacts of a finetuning job."
}, },
"PostTrainingMetric": {
"type": "object",
"properties": {
"epoch": {
"type": "integer"
},
"train_loss": {
"type": "number"
},
"validation_loss": {
"type": "number"
},
"perplexity": {
"type": "number"
}
},
"additionalProperties": false,
"required": [
"epoch",
"train_loss",
"validation_loss",
"perplexity"
],
"title": "PostTrainingMetric"
},
"PostTrainingJobStatusResponse": { "PostTrainingJobStatusResponse": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -7838,8 +7838,30 @@ components:
- start_time - start_time
title: Trace title: Trace
Checkpoint: Checkpoint:
description: Checkpoint created during training runs type: object
properties:
identifier:
type: string
created_at:
type: string
format: date-time
epoch:
type: integer
post_training_job_id:
type: string
path:
type: string
training_metrics:
$ref: '#/components/schemas/PostTrainingMetric'
additionalProperties: false
required:
- identifier
- created_at
- epoch
- post_training_job_id
- path
title: Checkpoint title: Checkpoint
description: Checkpoint created during training runs
PostTrainingJobArtifactsResponse: PostTrainingJobArtifactsResponse:
type: object type: object
properties: properties:
@ -7855,6 +7877,24 @@ components:
- checkpoints - checkpoints
title: PostTrainingJobArtifactsResponse title: PostTrainingJobArtifactsResponse
description: Artifacts of a finetuning job. description: Artifacts of a finetuning job.
PostTrainingMetric:
type: object
properties:
epoch:
type: integer
train_loss:
type: number
validation_loss:
type: number
perplexity:
type: number
additionalProperties: false
required:
- epoch
- train_loss
- validation_loss
- perplexity
title: PostTrainingMetric
PostTrainingJobStatusResponse: PostTrainingJobStatusResponse:
type: object type: object
properties: properties:

View file

@ -19,8 +19,10 @@ class PostTrainingMetric(BaseModel):
perplexity: float perplexity: float
@json_schema_type(schema={"description": "Checkpoint created during training runs"}) @json_schema_type
class Checkpoint(BaseModel): class Checkpoint(BaseModel):
"""Checkpoint created during training runs"""
identifier: str identifier: str
created_at: datetime created_at: datetime
epoch: int epoch: int

View file

@ -61,25 +61,25 @@ class RunpodInferenceAdapter(
self, self,
model: str, model: str,
content: InterleavedContent, content: InterleavedContent,
sampling_params: Optional[SamplingParams] = None, sampling_params: SamplingParams | None = None,
response_format: Optional[ResponseFormat] = None, response_format: ResponseFormat | None = None,
stream: Optional[bool] = False, stream: bool | None = False,
logprobs: Optional[LogProbConfig] = None, logprobs: LogProbConfig | None = None,
) -> AsyncGenerator: ) -> AsyncGenerator:
raise NotImplementedError() raise NotImplementedError()
async def chat_completion( async def chat_completion(
self, self,
model: str, model: str,
messages: List[Message], messages: list[Message],
sampling_params: Optional[SamplingParams] = None, sampling_params: SamplingParams | None = None,
response_format: Optional[ResponseFormat] = None, response_format: ResponseFormat | None = None,
tools: Optional[List[ToolDefinition]] = None, tools: list[ToolDefinition] | None = None,
tool_choice: Optional[ToolChoice] = ToolChoice.auto, tool_choice: ToolChoice | None = ToolChoice.auto,
tool_prompt_format: Optional[ToolPromptFormat] = None, tool_prompt_format: ToolPromptFormat | None = None,
stream: Optional[bool] = False, stream: bool | None = False,
logprobs: Optional[LogProbConfig] = None, logprobs: LogProbConfig | None = None,
tool_config: Optional[ToolConfig] = None, tool_config: ToolConfig | None = None,
) -> AsyncGenerator: ) -> AsyncGenerator:
if sampling_params is None: if sampling_params is None:
sampling_params = SamplingParams() sampling_params = SamplingParams()
@ -129,10 +129,10 @@ class RunpodInferenceAdapter(
async def embeddings( async def embeddings(
self, self,
model: str, model: str,
contents: List[str] | List[InterleavedContentItem], contents: list[str] | list[InterleavedContentItem],
text_truncation: Optional[TextTruncation] = TextTruncation.none, text_truncation: TextTruncation | None = TextTruncation.none,
output_dimension: Optional[int] = None, output_dimension: int | None = None,
task_type: Optional[EmbeddingTaskType] = None, task_type: EmbeddingTaskType | None = None,
) -> EmbeddingsResponse: ) -> EmbeddingsResponse:
raise NotImplementedError() raise NotImplementedError()

View file

@ -225,7 +225,6 @@ follow_imports = "silent"
# to exclude the entire directory. # to exclude the entire directory.
exclude = [ exclude = [
# As we fix more and more of these, we should remove them from the list # As we fix more and more of these, we should remove them from the list
"^llama_stack/apis/common/training_types\\.py$",
"^llama_stack/cli/download\\.py$", "^llama_stack/cli/download\\.py$",
"^llama_stack/cli/stack/_build\\.py$", "^llama_stack/cli/stack/_build\\.py$",
"^llama_stack/distribution/build\\.py$", "^llama_stack/distribution/build\\.py$",