mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 13:00:39 +00:00
tmp
This commit is contained in:
parent
3e0d4901da
commit
4acd1e404e
2 changed files with 12 additions and 7 deletions
|
@ -28,9 +28,11 @@ class CommonJobFields(BaseModel):
|
||||||
:param status: The status of the job.
|
:param status: The status of the job.
|
||||||
:param created_at: The time the job was created.
|
:param created_at: The time the job was created.
|
||||||
:param finished_at: The time the job finished.
|
:param finished_at: The time the job finished.
|
||||||
|
:param error: If status of the job is failed, this will contain the error message.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
id: str
|
id: str
|
||||||
status: JobStatus
|
status: JobStatus
|
||||||
created_at: datetime
|
created_at: datetime
|
||||||
finished_at: Optional[datetime] = None
|
finished_at: Optional[datetime] = None
|
||||||
|
error: Optional[str] = None
|
||||||
|
|
|
@ -10,7 +10,7 @@ from pydantic import BaseModel, Field
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
from llama_stack.apis.agents import AgentConfig
|
from llama_stack.apis.agents import AgentConfig
|
||||||
from llama_stack.apis.common.job_types import Job, JobStatus
|
from llama_stack.apis.common.job_types import CommonJobFields, JobStatus
|
||||||
from llama_stack.apis.inference import SamplingParams, SystemMessage
|
from llama_stack.apis.inference import SamplingParams, SystemMessage
|
||||||
from llama_stack.apis.scoring import ScoringResult
|
from llama_stack.apis.scoring import ScoringResult
|
||||||
from llama_stack.apis.scoring_functions import ScoringFnParams
|
from llama_stack.apis.scoring_functions import ScoringFnParams
|
||||||
|
@ -84,12 +84,15 @@ class EvaluateResponse(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
class EvalJob(Job):
|
class EvalJob(CommonJobFields):
|
||||||
"""The EvalJob object representing a evaluation job that was created through API.
|
"""The EvalJob object representing a evaluation job that was created through API."""
|
||||||
|
|
||||||
:param job_id: The ID of the job.
|
type: Literal["eval"] = "eval"
|
||||||
:param status: The status of the job.
|
# TODO: result files or result datasets ids?
|
||||||
"""
|
result_files: List[str] = Field(
|
||||||
|
default_factory=list,
|
||||||
|
description="Result files of an evaluation run. Which can be queried for results.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Eval(Protocol):
|
class Eval(Protocol):
|
||||||
|
@ -99,7 +102,7 @@ class Eval(Protocol):
|
||||||
async def evaluate_benchmark(
|
async def evaluate_benchmark(
|
||||||
self,
|
self,
|
||||||
benchmark_id: str,
|
benchmark_id: str,
|
||||||
benchmark_config: BenchmarkConfig,
|
candidate: EvalCandidate,
|
||||||
) -> EvalJob:
|
) -> EvalJob:
|
||||||
"""Run an evaluation on a benchmark.
|
"""Run an evaluation on a benchmark.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue