From ccaf6aaa511a544948a6cf8a99e13ca200852c40 Mon Sep 17 00:00:00 2001 From: Cesare Pompeiano Date: Wed, 3 Sep 2025 11:33:35 +0200 Subject: [PATCH] chore(python-deps): replace ibm_watson_machine_learning with ibm_watsonx_ai (#3302) # What does this PR do? This PR updates the Watsonx provider dependencies from `ibm_watson_machine_learning` to `ibm_watsonx_ai`. The old package `ibm_watson_machine_learning` is in **deprecation mode** ([[PyPI link](https://pypi.org/project/ibm-watson-machine-learning/)](https://pypi.org/project/ibm-watson-machine-learning/)) and relies on older versions of dependencies such as `pandas`. Updating to `ibm_watsonx_ai` ensures compatibility with current dependency versions and ongoing support. ## Test Plan I verified the update by running an inference using a model provided by Watsonx. The model ran successfully, confirming that the new dependency works as expected. Co-authored-by: are-ces --- llama_stack/providers/registry/inference.py | 2 +- llama_stack/providers/remote/inference/watsonx/watsonx.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llama_stack/providers/registry/inference.py b/llama_stack/providers/registry/inference.py index 6264de7c7..fb841afdf 100644 --- a/llama_stack/providers/registry/inference.py +++ b/llama_stack/providers/registry/inference.py @@ -292,7 +292,7 @@ Available Models: api=Api.inference, adapter=AdapterSpec( adapter_type="watsonx", - pip_packages=["ibm_watson_machine_learning"], + pip_packages=["ibm_watsonx_ai"], module="llama_stack.providers.remote.inference.watsonx", config_class="llama_stack.providers.remote.inference.watsonx.WatsonXConfig", provider_data_validator="llama_stack.providers.remote.inference.watsonx.WatsonXProviderDataValidator", diff --git a/llama_stack/providers/remote/inference/watsonx/watsonx.py b/llama_stack/providers/remote/inference/watsonx/watsonx.py index 78161d1cb..cb7fc175f 100644 --- a/llama_stack/providers/remote/inference/watsonx/watsonx.py +++ b/llama_stack/providers/remote/inference/watsonx/watsonx.py @@ -7,8 +7,8 @@ from collections.abc import AsyncGenerator, AsyncIterator from typing import Any -from ibm_watson_machine_learning.foundation_models import Model -from ibm_watson_machine_learning.metanames import GenTextParamsMetaNames as GenParams +from ibm_watsonx_ai.foundation_models import Model +from ibm_watsonx_ai.metanames import GenTextParamsMetaNames as GenParams from openai import AsyncOpenAI from llama_stack.apis.common.content_types import InterleavedContent, InterleavedContentItem