Repository navigation
Move machine learning to the native OpenSearch client - #143
Open
esmarkowski wants to merge 3 commits into
Conversation
Stretchy::MachineLearning::Resource gives models and connectors the same class-level `settings` declaration and the same registry-backed remote id, replacing the Connector::Settings method_missing delegation and the METHODS loop in Model. The registry gains a `remote_id` attribute, falling back to `model_id` for entries written before it existed, so connector ids no longer live in a field named for models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
opensearch-ruby 4 ships client.ml, so the vendored lib/opensearch and lib/elasticsearch action copies are removed and Model and Connector call register_model, deploy_model, create_connector, etc. directly. Breaking changes: - ML Commons is OpenSearch-only; the Elasticsearch ML and _connector copies are gone - register no longer deploys; call deploy after registering - deployed? queries the model state on every call - query string searches are sent as a query_string body - json < 3 is pinned in the Gemfile until opensearch-ruby 4 stops passing parse options positionally Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ModelGroup registers an ML Commons model group and remembers its id in the registry. Models declare `model_group :embeddings` to register into it. Resource gains `remote_name`, the name sent to the cluster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
esmarkowski
marked this pull request as ready for review
November 16, 2026 22:09
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ML models and connectors now call opensearch-ruby 4's
client.mldirectly instead of the vendoredlib/opensearchandlib/elasticsearchaction copies, which are removed. Models, connectors and the new model groups share oneResourceconcern for their settings DSL and the remote id kept in the registry.Breaking changes:
registerno longer deploys. Calldeployafter registering.deployed?checks the model state on every call instead of caching it.json < 3until opensearch-ruby 4 stops passing parse options positionally.Specs pass on OpenSearch 3.9.0, OpenSearch 2.19.7 and Elasticsearch 8.12.2.
Closes #136