Skip to content

Commit

Permalink
Fix the eval for chat models
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDzurb committed Nov 20, 2024
1 parent 9dfa556 commit 2cbe281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ads/aqua/evaluation/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class CreateAquaEvaluationDetails(Serializable):
ocpus: Optional[float] = None
log_group_id: Optional[str] = None
log_id: Optional[str] = None
metrics: Optional[List] = None
metrics: Optional[List[Dict[str, Any]]] = None
force_overwrite: Optional[bool] = False

class Config:
Expand Down Expand Up @@ -140,7 +140,7 @@ class AquaEvaluationCommands(Serializable):
evaluation_id: str
evaluation_target_id: str
input_data: Dict[str, Any]
metrics: List
metrics: List[Dict[str, Any]]
output_dir: str
params: Dict[str, Any]

Expand Down
8 changes: 2 additions & 6 deletions ads/aqua/evaluation/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ def create(
create_aqua_evaluation_details = CreateAquaEvaluationDetails(**kwargs)
except Exception as ex:
custom_errors = {
".".join(map(str, e["loc"])): e["msg"] for e in json.loads(ex.json())
".".join(map(str, e["loc"])): e["msg"]
for e in json.loads(ex.json())
}
raise AquaValueError(
f"Invalid create evaluation parameters. Error details: {custom_errors}."
Expand Down Expand Up @@ -619,11 +620,6 @@ def _build_launch_cmd(
evaluation_id=evaluation_id,
evaluation_target_id=evaluation_source_id,
input_data={
"columns": {
"prompt": "prompt",
"completion": "completion",
"category": "category",
},
"format": Path(dataset_path).suffix,
"url": dataset_path,
},
Expand Down

0 comments on commit 2cbe281

Please sign in to comment.