mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
some finetuning changes
This commit is contained in:
parent
6ec7c47938
commit
c1f6816d76
4 changed files with 187 additions and 13 deletions
|
@ -12,6 +12,7 @@ from agentic_system_types import (
|
|||
)
|
||||
|
||||
from finetuning_types import (
|
||||
Checkpoint,
|
||||
Dataset,
|
||||
DoraFinetuningConfig,
|
||||
FinetuningAlgorithm,
|
||||
|
@ -233,6 +234,7 @@ class MessageScore:
|
|||
message: Message
|
||||
score: float
|
||||
|
||||
|
||||
@json_schema_type
|
||||
@dataclass
|
||||
class KScoredPromptGenerations:
|
||||
|
@ -375,6 +377,19 @@ class FinetuningJobStatusResponse:
|
|||
|
||||
resources_allocated: Optional[Dict[str, Any]] = None
|
||||
|
||||
checkpoints: List[Checkpoint] = field(default_factory=list)
|
||||
|
||||
|
||||
@json_schema_type
|
||||
@dataclass
|
||||
class FinetuningJobArtifactsResponse:
|
||||
"""Artifacts of a finetuning job."""
|
||||
|
||||
job_uuid: str
|
||||
checkpoints: List[Checkpoint] = field(default_factory=list)
|
||||
|
||||
# TODO(ashwin): metrics, evals
|
||||
|
||||
|
||||
class Finetuning(Protocol):
|
||||
@webmethod(route="/finetuning/text_generation/train")
|
||||
|
@ -393,6 +408,11 @@ class Finetuning(Protocol):
|
|||
@webmethod(route="/finetuning/job/cancel")
|
||||
def cancel_training_job(self, job_uuid: str) -> None: ...
|
||||
|
||||
@webmethod(route="/finetuning/job/artifacts")
|
||||
def get_training_job_artifacts(
|
||||
self, job_uuid: str
|
||||
) -> FinetuningJobArtifactsResponse: ...
|
||||
|
||||
|
||||
class LlamaStackEndpoints(
|
||||
Inference,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue