Skip to content

Conversation

@cjrolo
Copy link
Contributor

@cjrolo cjrolo commented Sep 9, 2025

Description

This change documents the creation and testing of local LLMs within opensearch (Ollama for example)

Related Issues

Resolves #4146

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

cjrolo and others added 2 commits September 8, 2025 21:24
Signed-off-by: Carlos Rolo <carlos.rolo@netapp.com>
Signed-off-by: Carlos Rolo <carlos.rolo@netapp.com>
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 07:59 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 07:59 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 07:59 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 07:59 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 11:16 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 11:16 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 11:16 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 11:16 — with GitHub Actions Error
@cjrolo cjrolo temporarily deployed to ml-commons-cicd-env-require-approval September 9, 2025 11:19 — with GitHub Actions Inactive
@cjrolo cjrolo temporarily deployed to ml-commons-cicd-env-require-approval September 9, 2025 11:19 — with GitHub Actions Inactive
@cjrolo cjrolo temporarily deployed to ml-commons-cicd-env-require-approval September 9, 2025 11:19 — with GitHub Actions Inactive
@cjrolo cjrolo temporarily deployed to ml-commons-cicd-env-require-approval September 9, 2025 11:19 — with GitHub Actions Inactive
## 4. Register the model

```json
POST /_plugins/_ml/models/_register
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can do register and deploy is true, which save one step, POST /_plugins/_ml/models/_register?deploy=true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had that originally and then removed because IMO POST /_plugins/_ml/models/_register? Deploy=true gives a sense of automagic things happening. And with the explicit POST readers have to understand that there is this step (which you can automate) of deploying the connector.

After your comment about the tutorial, I think adding all the options in the tutorial to keep the blueprint cleaner would be a good one. But I'm open to exactly the opposite: making the blueprint very clean, even with such automations in place (and a note saying that they are there) and make the tutorial more dense with explanations about the deploying (and others) of models.

What option do you prefer?

PS: Just for reference, my first commit didn't have any deploy because I have auto deploy in my test cluster, that is something I would like to avoid for new readers.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice to have both options, so the blueprint is friendly for starter and also giving a good tip for advanced users who wants to speed up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do that.

@mingshl
Copy link
Collaborator

mingshl commented Sep 9, 2025

this looks great! You nailed it. Just added a very minor comment. It would be even nice if you can add the tutorial here using Ollma with the RAG processor, from the nice demo you built for conversation chat.

@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.91%. Comparing base (70d8f18) to head (286c433).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #4160   +/-   ##
=========================================
  Coverage     81.91%   81.91%           
- Complexity     8874     8875    +1     
=========================================
  Files           762      762           
  Lines         38166    38166           
  Branches       4264     4264           
=========================================
+ Hits          31263    31264    +1     
+ Misses         5078     5076    -2     
- Partials       1825     1826    +1     
Flag Coverage Δ
ml-commons 81.91% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 18:10 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 9, 2025 18:10 — with GitHub Actions Failure
@cjrolo
Copy link
Contributor Author

cjrolo commented Sep 10, 2025

Ok let me add that too this PR then.

```json
POST /_plugins/_ml/models/WWQI44MBbzI2oUKAvNUt/_deploy
{
"node_ids": ["4PLK7KJWReyX0oWKnBA8nA"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use this, you need to enable plugins.ml_commons.allow_custom_deployment_plan setting.
To make the doc easier to follow, I think you can just use POST /_plugins/_ml/models/<MODEL_ID>/_deploy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a mistake on my part, let me fix that.

@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 17, 2025 17:00 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 17, 2025 17:00 — with GitHub Actions Error
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 17, 2025 17:00 — with GitHub Actions Failure
@cjrolo cjrolo had a problem deploying to ml-commons-cicd-env-require-approval September 17, 2025 17:00 — with GitHub Actions Error
@mingshl
Copy link
Collaborator

mingshl commented Sep 18, 2025

LGTM, the CI failure are not related to your code changes, I am going to retrigger one more time.

@mingshl mingshl had a problem deploying to ml-commons-cicd-env-require-approval September 18, 2025 17:43 — with GitHub Actions Failure
@mingshl mingshl had a problem deploying to ml-commons-cicd-env-require-approval September 18, 2025 17:43 — with GitHub Actions Failure
@mingshl mingshl had a problem deploying to ml-commons-cicd-env-require-approval September 18, 2025 17:43 — with GitHub Actions Failure
@mingshl mingshl had a problem deploying to ml-commons-cicd-env-require-approval September 18, 2025 17:43 — with GitHub Actions Failure
@ylwu-amzn ylwu-amzn merged commit 467a8ee into opensearch-project:main Sep 19, 2025
4 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] add connector blueprint for Ollama

3 participants