revert job related

This commit is contained in:
Xi Yan 2025-03-17 17:12:28 -07:00
parent 452b2b1284
commit ade3391170
2 changed files with 11 additions and 11 deletions

View file

@ -12,6 +12,12 @@ from pydantic import BaseModel
from llama_stack.schema_utils import json_schema_type
@json_schema_type
class Job(BaseModel):
# NOTE: this will be DEPRECATED in favour of CommonJobFields
job_id: str
class JobType(Enum):
batch_inference = "batch_inference"
evaluation = "evaluation"
@ -26,14 +32,6 @@ class JobStatus(Enum):
cancelled = "cancelled"
class JobArtifact(BaseModel):
"""
A job artifact is a file or directory that is produced by a job.
"""
path: str
@json_schema_type
class CommonJobFields(BaseModel):
"""Common fields for all jobs.

View file

@ -10,7 +10,7 @@ from pydantic import BaseModel, Field
from typing_extensions import Annotated
from llama_stack.apis.agents import AgentConfig
from llama_stack.apis.common.job_types import CommonJobFields, JobStatus
from llama_stack.apis.common.job_types import Job, JobStatus
from llama_stack.apis.inference import SamplingParams, SystemMessage
from llama_stack.apis.scoring import ScoringResult
from llama_stack.apis.scoring_functions import ScoringFnParams
@ -91,7 +91,7 @@ class Eval(Protocol):
self,
benchmark_id: str,
benchmark_config: BenchmarkConfig,
) -> CommonJobFields:
) -> Job:
"""Run an evaluation on a benchmark.
:param benchmark_id: The ID of the benchmark to run the evaluation on.
@ -135,7 +135,9 @@ class Eval(Protocol):
"""
...
@webmethod(route="/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result", method="GET")
@webmethod(
route="/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result", method="GET"
)
async def job_result(self, benchmark_id: str, job_id: str) -> EvaluateResponse:
"""Get the result of a job.