watsonx is a next generation enterprise studio for AI builders to train, validate, tune and deploy AI models.
Comet provides a hosted version of the Opik platform, simply create an account and grab your API Key.
You can also run the Opik platform locally, see the installation guide for more information.
To start tracking your watsonx LLM calls, you can use our LiteLLM integration. You’ll need to have both the opik and litellm packages installed. You can install them using pip:
Configure the Opik Python SDK for your deployment type. See the Python SDK Configuration guide for detailed instructions on:
opik configureopik.configure()If you’re unable to use our LiteLLM integration with watsonx, please open an issue
In order to configure watsonx, you will need to have:
Once you have these, you can set them as environment variables:
In order to log the LLM calls to Opik, you will need to create the OpikLogger callback. Once the OpikLogger callback is created and added to LiteLLM, you can make calls to LiteLLM as you normally would:

@track decoratorIf you have multiple steps in your LLM pipeline, you can use the @track decorator to log the traces for each step. If WatsonX is called within one of these steps, the LLM call will be associated with that corresponding step:
