-
Notifications
You must be signed in to change notification settings - Fork 80
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
Use endpoint instead of model in the inference API #2528
Conversation
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.
Thanks! Since this is for 8.15, I suggest waiting for elastic/elasticsearch#107704 so that we make sure 1/ the JSON spec is exactly the same and 2/ allow clients-flight-recorder to keep up with the change and validate this properly.
I left a few comments there too.
That PR is green now. I hesitated before pressing the merge button as after merging we must have a compatible client ready for the next serverless release and when it comes to the breaking change I am hoping there is someway to soften the blow. Taking Python as an example, existing code will use |
I'm not sure we can deprecate an endpoint today if the endpoint itself is gone from Elasticsearch. (The only existing example is _knn_search.) Also, the clients are one thing, but on Serverless right now the usage of Kibana is quite high. And it's not like deprecating a function has any practical effect: things will break eventually. I suppose that's why tech preview is for.
We don't have great automation here, most serverless clients don't get frequent updates yet. We can coordinate to get the serverless Python client out when you want, if that helps. |
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.
Thanks! Requested a few cosmetic fixes and asked about the models
alias.
|
||
export class Response { | ||
body: { | ||
models: Array<ModelConfigContainer> | ||
/** @aliases models */ |
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.
Since we decided to break compatibility, should we keep models as an alias? For what it's worth, the current Python client does the wrong thing and would send models
as is to the server. That could be fixed in time for 8.15 though.
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 agree and have removed the alias.
The change breaks compatibility, we can do that because the API is neither GA or heavily used therefore it should be a clean break.
Co-authored-by: Quentin Pradet <[email protected]>
Co-authored-by: Miguel Grinberg <[email protected]>
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.
Thanks! LGTM.
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Thanks for the reviews |
Update the inference APIs to refer to Inference endpoints rather than models. This involves renaming classes and updating comments but also includes the potentially breaking changes:
inference.delete_model
renamed toinference.delete
inference.get_model
renamed toinference.get
inference.put_model
renamed toinference.put
The format of the
get
response has also changed, themodels
field is renamed toendpoints
:In
GetResponse.ts
I've used an@alias
tag to retain themodels
optionCorresponding Elasticsearch change elastic/elasticsearch#107704