-
Notifications
You must be signed in to change notification settings - Fork 102
Fix infer_trained_model API #2786
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
Conversation
It can return list of lists of integers and floats.
This comment was marked as outdated.
This comment was marked as outdated.
I can't find any places in the Elasticsearch code where an array of doubles or ints is returned. Do you have an example pls? Why isn't the list case covered by this line in the spec? Is the result a lists of lists of numbers?
|
@davidkyle Sorry that I missed your comment. It happens in four "3rd party deployment" ML YAML tests, for example https://github.com/elastic/elasticsearch/blob/0d38528e0e6f01010ba4a6d11d84ff7a5ddf32f4/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/ml/3rd_party_deployment.yml#L600-L622. In all cases, the following JSON is returned: {
"inference_results": [
{
"predicted_value": [
[
1,
1
]
]
}
]
} Agreed that if predicted_value can be a list already, that should be covered somehow. |
Actually yes it is a list of lists, so there's a missing list somewhere, |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
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.
LGTM
Thanks @pquentin, the yml test you linked to uses the special pass_through
type that returns the raw response. I'd forgotten about that one sorry
Merging, assuming that only ints and floats can be lists of lists. Happy to open another PR if that's not the case. Thank you! |
Yes only ints and floats |
It can return list of lists of integers and floats.