Python client for train api (when creating a model for knn indexing)

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch 1.0
opensearch-py 2.1.1

Describe the issue:
I’m trying to call the train API (this) in order to generate a model for knn-based indexing using faiss and product quantization (based on this). However I can’t find a way to call the train api through the python client. Is there a way that I’m missing? If not, what are my other options, if I want to invoke it through a python script.
Thanks

Configuration:

Relevant Logs or Screenshots:

You’re right , there is not coverage in the python client for the train API. There’s a recently opened issue in the github repo here: [FEATURE] wrapper for train API for creating knn index models · Issue #291 · opensearch-project/opensearch-py · GitHub

Typically, when the client is missing a plugin integration, you can do a curl request in your application to the API to the plugin and manage the parameters and response processing manually.

I know it’s fiddly, and feel free to submit a PR on the client itself if it makes your life easier.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.