mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-29 08:18:46 +00:00
fix: Fix paths in Eval helper functions; update ModelCandidate to support Evals that use chat datasets
This commit is contained in:
parent
e273a68567
commit
7840a53a12
4 changed files with 46 additions and 9 deletions
|
|
@ -27,8 +27,8 @@ class ModelCandidate(BaseModel):
|
|||
"""
|
||||
|
||||
type: Literal["model"] = "model"
|
||||
model: str
|
||||
sampling_params: SamplingParams
|
||||
model: Union[str, Dict[str, Any]]
|
||||
sampling_params: Optional[SamplingParams] = Field(default_factory=SamplingParams)
|
||||
system_message: Optional[SystemMessage] = None
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ class NVIDIAEvalImpl(
|
|||
|
||||
async def _evaluator_get(self, path):
|
||||
"""Helper for making GET requests to the evaluator service."""
|
||||
response = requests.get(url=f"{self.config.evaluator_service_url}/{path}")
|
||||
response = requests.get(url=f"{self.config.evaluator_service_url}{path}")
|
||||
response.raise_for_status()
|
||||
return response.json()
|
||||
|
||||
async def _evaluator_post(self, path, data):
|
||||
"""Helper for making POST requests to the evaluator service."""
|
||||
response = requests.post(url=f"{self.config.evaluator_service_url}/{path}", json=data)
|
||||
response = requests.post(url=f"{self.config.evaluator_service_url}{path}", json=data)
|
||||
response.raise_for_status()
|
||||
return response.json()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue