opensearch-project / ml-commons

ml-commons provides a set of common machine learning algorithms, e.g. k-means, or linear regression, to help developers build ML related features within OpenSearch.
Apache License 2.0
99 stars 136 forks source link

[FEATURE] ML Commons Java Rest Client #2788

Open saratvemulapalli opened 4 months ago

saratvemulapalli commented 4 months ago

Is your feature request related to a problem? I have a custom distribution of OpenSearch where I have ML Commons installed in its own dedicated cluter. I would like to have ML Commons Java Rest Client in order to have my application code to communicate with ML Commons for predict.

What solution would you like? As said above I would like a ML Commons rest client which can be consumed by my application and I would be happy to contribute.

I see 4 options:

  1. In addition to transport ml-client[1], another new interface will be introduced for rest client and a default implementation will be contributed.
  2. The default implementation would be a wrapper around opensearch-high-level-rest client (which is on its path to deprecation).
  3. The default implementation would be a wrapper around Apache HTTP client.
  4. OpenSearch-java which is a replacement for opensearch-high-level-rest client. Though it does not support plugins yet, contributing to https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/namespaces/ml.yaml will automatically generate a Java client (this is work in progress by @Xtansia / @dblock)

Looking at possible options, I do prefer 4., maintaining one spec and generating clients in the language of choice. In my use case, I would need opensearch-java client.

Maintainers, let me know your thoughts/feedback?

dblock commented 3 months ago

Catch All Triage - 1, 2, 3