Skip to content

Draft Watsonx inference API #3866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 5, 2025
Merged

Draft Watsonx inference API #3866

merged 6 commits into from
Mar 5, 2025

Conversation

lcawl
Copy link
Contributor

@lcawl lcawl commented Mar 4, 2025

Relates to #3821, elastic/elasticsearch#115088

This PR is an attempt to handle the Watsonx inference use case, with content derived from https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html

The following linting error occurs:

  9040:5    warning  no-identical-paths             The path already exists which differs only by path parameter name(s): `/_inference/{task_type}/{inference_id}` and `/_inference/{task_type}/{watsonx_inference_id}`.

This is essentially because there are multiple paths that are interchangeable (since neither the task type nor the inference ID in the path are unique to each of these variations). We are currently treating that type of lint message as a warning, however, so if that's the best method to represent these endpoints the linting message is acceptable IMO.

Copy link
Contributor

github-actions bot commented Mar 4, 2025

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.put_watsonx Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@lcawl lcawl marked this pull request as ready for review March 4, 2025 21:25
@lcawl lcawl requested a review from a team as a code owner March 4, 2025 21:25
Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

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

LGTM from my side. Thank you 🙂 Maybe Laura wants to double check.

Copy link
Contributor

github-actions bot commented Mar 5, 2025

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.stream_inference Missing test Missing test
inference.unified_inference Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

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

LGTM!

@lcawl lcawl merged commit 16c8bd3 into main Mar 5, 2025
8 checks passed
@lcawl lcawl deleted the watsonx branch March 5, 2025 15:19
Copy link
Contributor

github-actions bot commented Mar 5, 2025

The backport to 8.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-3866-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 16c8bd383b6caa644ab64a57e989bb1d75b8b458
# Push it to GitHub
git push --set-upstream origin backport-3866-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.x

Then, create a pull request where the base branch is 8.x and the compare/head branch is backport-3866-to-8.x.

Copy link
Contributor

github-actions bot commented Mar 5, 2025

The backport to 8.18 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-3866-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 16c8bd383b6caa644ab64a57e989bb1d75b8b458
# Push it to GitHub
git push --set-upstream origin backport-3866-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18

Then, create a pull request where the base branch is 8.18 and the compare/head branch is backport-3866-to-8.18.

github-actions bot pushed a commit that referenced this pull request Mar 5, 2025
Co-authored-by: Laura Trotta <[email protected]>
(cherry picked from commit 16c8bd3)
lcawl added a commit that referenced this pull request Mar 5, 2025
Co-authored-by: Laura Trotta <[email protected]>
(cherry picked from commit 16c8bd3)
@lcawl
Copy link
Contributor Author

lcawl commented Mar 5, 2025

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

Copy link
Contributor

github-actions bot commented Mar 5, 2025

The backport to 8.17 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.17 8.17
# Navigate to the new working tree
cd .worktrees/backport-8.17
# Create a new branch
git switch --create backport-3866-to-8.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 16c8bd383b6caa644ab64a57e989bb1d75b8b458
# Push it to GitHub
git push --set-upstream origin backport-3866-to-8.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.17

Then, create a pull request where the base branch is 8.17 and the compare/head branch is backport-3866-to-8.17.

lcawl added a commit that referenced this pull request Mar 5, 2025
Co-authored-by: Laura Trotta <[email protected]>
(cherry picked from commit 16c8bd3)
@lcawl
Copy link
Contributor Author

lcawl commented Mar 5, 2025

💚 All backports created successfully

Status Branch Result
8.18

Questions ?

Please refer to the Backport tool documentation

lcawl added a commit that referenced this pull request Mar 5, 2025
Co-authored-by: Laura Trotta <[email protected]>
(cherry picked from commit 16c8bd3)
l-trotta added a commit that referenced this pull request Mar 5, 2025
Co-authored-by: Laura Trotta <[email protected]>
(cherry picked from commit 16c8bd3)
l-trotta pushed a commit that referenced this pull request Mar 5, 2025
Co-authored-by: Laura Trotta <[email protected]>
(cherry picked from commit 16c8bd3)

Co-authored-by: Lisa Cawley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants