Finding Custom Models in Watson Discovery


My blog posts often focus on issues that my customers are having – I solve them once for someone and then share that with the wider world in the hopes that someone else may find my guidance useful. This week, I ran into a new issue with a new customer of mine.

My customer was wondering about the use of custom models in their account, and how this impacted their usage of the Watson Discovery service. They were being charged for each custom model used by the Discovery service, but they had no idea of where they were being used. I went and looked in the UI, but found nothing that indicated where custom models had been applied.

So I dug into the API and found out how you can tell. The key is the API call to get-configuration, which returns a JSON payload with information about the configurations in your Discovery instance. Using that information, along with some calls to other API services likelist_collections and list_configurations, you can find out which Discovery collections are using custom models.

Since I had to figure this out for myself, I decided to do some quick and dirty Python code to do this for me, for any given Discovery instance. If you’re interested, you can go and get your own copy of the code out in my GitHub project called Discovery Custom Model Detect. The code is a bit rough, but it gets the job done. Feel free to pretty it up or make it more interactive.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.