-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve evaluation model params #990
Conversation
ads/aqua/evaluation/evaluation.py
Outdated
@@ -164,7 +161,7 @@ def create( | |||
raise AquaValueError( | |||
"Invalid create evaluation parameters. " | |||
"Allowable parameters are: " | |||
f"{', '.join([field.name for field in fields(CreateAquaEvaluationDetails)])}." | |||
f"{', '.join([field for field in CreateAquaEvaluationDetails.model_fields])}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pydantic by itself can give meaningful message if something wrong with the input params. We probably can have something like
except Exception as ex:
raise AquaValueError(
"Invalid create evaluation parameters. "
f"Details: {ex}"
Can you check this?
In the evaluation framework i did this:
except ValidationError as err:
custom_errors = {
".".join(map(str, e["loc"])): e["msg"] for e in json.loads(err.json())
}
raise InvalidEvaluationConfigValidationError(
evaluation_config=config, errors=custom_errors
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve evaluation model params
evaluation
aspydantic
AquaEvalParams
to accept all model parameters from customerNotebook