mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 15:52:39 +00:00
temp commit
This commit is contained in:
parent
9c1ae088f9
commit
c9a009b5e7
7 changed files with 268 additions and 53 deletions
|
|
@ -14,6 +14,7 @@ from llama_models.schema_utils import json_schema_type, webmethod
|
|||
from pydantic import BaseModel, Field
|
||||
|
||||
from llama_models.llama3.api.datatypes import * # noqa: F403
|
||||
from llama_stack.apis.common.job_types import JobStatus
|
||||
from llama_stack.apis.datasets import * # noqa: F403
|
||||
from llama_stack.apis.common.training_types import * # noqa: F403
|
||||
|
||||
|
|
@ -87,14 +88,6 @@ class PostTrainingJobLogStream(BaseModel):
|
|||
log_lines: List[str]
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class PostTrainingJobStatus(Enum):
|
||||
running = "running"
|
||||
completed = "completed"
|
||||
failed = "failed"
|
||||
scheduled = "scheduled"
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class RLHFAlgorithm(Enum):
|
||||
dpo = "dpo"
|
||||
|
|
@ -139,7 +132,7 @@ class PostTrainingJobStatusResponse(BaseModel):
|
|||
"""Status of a finetuning job."""
|
||||
|
||||
job_uuid: str
|
||||
status: PostTrainingJobStatus
|
||||
status: JobStatus
|
||||
|
||||
scheduled_at: Optional[datetime] = None
|
||||
started_at: Optional[datetime] = None
|
||||
|
|
@ -192,16 +185,10 @@ class PostTraining(Protocol):
|
|||
@webmethod(route="/post-training/jobs")
|
||||
async def get_training_jobs(self) -> List[PostTrainingJob]: ...
|
||||
|
||||
# sends SSE stream of logs
|
||||
@webmethod(route="/post-training/job/logs")
|
||||
async def get_training_job_logstream(
|
||||
self, job_uuid: str
|
||||
) -> PostTrainingJobLogStream: ...
|
||||
|
||||
@webmethod(route="/post-training/job/status")
|
||||
async def get_training_job_status(
|
||||
self, job_uuid: str
|
||||
) -> PostTrainingJobStatusResponse: ...
|
||||
) -> Optional[PostTrainingJobStatusResponse]: ...
|
||||
|
||||
@webmethod(route="/post-training/job/cancel")
|
||||
async def cancel_training_job(self, job_uuid: str) -> None: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue