opensearch-py-ml
opensearch-py-ml copied to clipboard
[PROPOSAL] Merge with opensearch-py?
Is your feature request related to a problem?
Users are confused with the many OpenSearch clients. Is opensearch-py-ml one too many?
The dsl client has a high-level and a low-level interface. For AWS users there’s also boto3 (see https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-sdk.html#serverless-sdk-python), used to create collections. We have opensearch-dsl-py client that has been deprecated since 2.1 and will be archived.
What solution would you like?
Merge opensearch-py-ml into opensearch-py.
What alternatives have you considered?
Leave things as is.
I've reviewed the repository code, and I feel merging opensearch-py-ml into opensearch-py is feasible. I estimate it would take approximately 3 weeks to 1 month to merge all the code and tests, ensuring everything runs smoothly.
I think it might be worthwhile to conduct a high-level review of the ML API before merging it in. There are consistency and orthogonality issues that caused me a lot of confusion.
Here would be some things to discuss:
- HTTP or CRUD idiom -- should the methods be named
put
,get
,post
,delete
(as in the OpenSearch main API); orcreate
,update
,delete
(as in ML)? - should the methods be suffixed with the object name? eg, (using the HTTP idiom)
Connector.put_connector()
orConnector.put()
? - There are some differences in kwarg names that should be the same across the APIs, eg
body
andpayload
for the HTTP contents
my personal preference is for CRUD without repeating the object name, eg Connector.create()