mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 14:08:00 +00:00
fix
This commit is contained in:
parent
2b4e88a3de
commit
1302aabc60
1 changed files with 0 additions and 4 deletions
|
@ -25,7 +25,6 @@ from llama_stack.providers.inline.post_training.torchtune.config import (
|
||||||
)
|
)
|
||||||
from llama_stack.providers.utils.scheduler import JobArtifact, Scheduler
|
from llama_stack.providers.utils.scheduler import JobArtifact, Scheduler
|
||||||
from llama_stack.providers.utils.scheduler import JobStatus as SchedulerJobStatus
|
from llama_stack.providers.utils.scheduler import JobStatus as SchedulerJobStatus
|
||||||
from llama_stack.schema_utils import webmethod
|
|
||||||
|
|
||||||
|
|
||||||
class TrainingArtifactType(Enum):
|
class TrainingArtifactType(Enum):
|
||||||
|
@ -145,7 +144,6 @@ class TorchtunePostTrainingImpl:
|
||||||
data = cls._get_artifacts_metadata_by_type(job, TrainingArtifactType.RESOURCES_STATS.value)
|
data = cls._get_artifacts_metadata_by_type(job, TrainingArtifactType.RESOURCES_STATS.value)
|
||||||
return data[0] if data else None
|
return data[0] if data else None
|
||||||
|
|
||||||
@webmethod(route="/post-training/job/status")
|
|
||||||
async def get_training_job_status(self, job_uuid: str) -> PostTrainingJobStatusResponse | None:
|
async def get_training_job_status(self, job_uuid: str) -> PostTrainingJobStatusResponse | None:
|
||||||
job = self._scheduler.get_job(job_uuid)
|
job = self._scheduler.get_job(job_uuid)
|
||||||
|
|
||||||
|
@ -172,11 +170,9 @@ class TorchtunePostTrainingImpl:
|
||||||
resources_allocated=self._get_resources_allocated(job),
|
resources_allocated=self._get_resources_allocated(job),
|
||||||
)
|
)
|
||||||
|
|
||||||
@webmethod(route="/post-training/job/cancel")
|
|
||||||
async def cancel_training_job(self, job_uuid: str) -> None:
|
async def cancel_training_job(self, job_uuid: str) -> None:
|
||||||
self._scheduler.cancel(job_uuid)
|
self._scheduler.cancel(job_uuid)
|
||||||
|
|
||||||
@webmethod(route="/post-training/job/artifacts")
|
|
||||||
async def get_training_job_artifacts(self, job_uuid: str) -> PostTrainingJobArtifactsResponse | None:
|
async def get_training_job_artifacts(self, job_uuid: str) -> PostTrainingJobArtifactsResponse | None:
|
||||||
job = self._scheduler.get_job(job_uuid)
|
job = self._scheduler.get_job(job_uuid)
|
||||||
return PostTrainingJobArtifactsResponse(job_uuid=job_uuid, checkpoints=self._get_checkpoints(job))
|
return PostTrainingJobArtifactsResponse(job_uuid=job_uuid, checkpoints=self._get_checkpoints(job))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue