Getting Bluemix info for Support and Automation

Note: I added a section to this on April 10, 2017 on creating an org within your Bluemix account.  This was also published on IBM DeveloperWorks on April 13, 2017.

I like writing blogs, and I find that the inspiration for many of my blog posts is the fact that I hate answering the same question twice.  So when I was recently asked to help out a customer who needed some help in dealing with Bluemix support, I found myself answering a similar question to one I have found myself answering often in these circumstances.

The issue is that when working with Bluemix, the interface hides a lot of the complexity of managing a Cloud platform from the end user.  That’s good – I don’t really care what my org ID is (assuming that I even know exactly what an org ID is).  However, our Bluemix support teams often have to work “behind the scenes” in Bluemix, and they need to know things like org ID’s, instance ID’s, and service ID’s.  They will often ask for this information, and our customers have no idea how to get it.  So just follow along here, and you’ll be able to get all of that information (and more).

Setting Up

In order to get this information, you will need to use command line interpreter (CLI) tools.  There are two of them: the CloudFoundry CLI, and the Bluemix CLI.  In this example below, I show how to use the Bluemix CLI to get this information, but if you watch your terminal session, you can see how you would do things using the Cloud Foundry CLI, because the Bluemix CLI will tell you what Cloud Foundry commands it is invoking.

So to get started, you will need to install the CloudFoundry and Bluemix command line tools (download them here). 

Need to Setup a New Bluemix Org?

Some of you may want or need to set up a new Bluemix org under your account.  This cannot be done if you have a trial account, but if you have a pay-as-you-go account or Bluemix/Watson subscription, then you will be able to do this.  Just type in the following commands using the CloudFoundry command line tool:

  • Set the API endpoint
bluemix api https://api.ng.bluemix.net
  • Login to CloudFoundry
bluemix login -u <YOUR_USERID> -p <YOUR_PASSWORD> -s <YOUR_BLUEMIX_SPACE>

(I used cf login -u dtoczala@us.ibm.com -p myBig$ecret -s dev)

  • Now create your new org in your Bluemix workspace
bluemix iam org-create <NEW_ORG_NAME>

And then check to see if your new org was properly created.

Finding Out Your “Secret” Identifiers

Now you’re ready to find all of those obscure and hidden ID’s that support people are asking for.  Make sure that you have the Bluemix and CloudFoundry CLI’s downloaded and installed on your system.  Then you can do the following from the command line:

  • Set the API endpoint
bluemix api https://api.ng.bluemix.net
  • Login to Bluemix
bluemix login -u <YOUR_USERID> -p <YOUR_PASSWORD> -s <YOUR_BLUEMIX_SPACE>

(I used bluemix login -u dtoczala@us.ibm.com -p myBig$ecret -s dev)

  • Now see what orgs are out there in your Bluemix workspace
bluemix iam orgs

Check the list and get the name of the org that you are interested in

  • Now get more information on that org – just for fun
bluemix iam org <YOUR_ORG_NAME>

(I used bluemix iam org dtoczala@us.ibm.com)

  • Now get the Org ID information on that org – just add the –guid switch
bluemix iam org <YOUR_ORG_NAME> --guid

(I used bluemix iam org dtoczala@us.ibm.com –guid)

Copy/paste the returned information – this is your org ID.

  • Now lets get a service instance ID.  Start by getting a list of your services
bluemix service list

Get the name of the service in question (I pulled a Watson Conversation service)

  • Now get some more information on that service – just for fun
bluemix service show <YOUR_SERVICE_NAME>

(I used bluemix service show ToxSampleConversation)

  • Now get the Instance ID information on that service – just add the –guid switch
bluemix service show <YOUR_SERVICE_NAME> --guid

(I used bluemix service show ToxSampleConversation –guid)

Copy/paste the returned information – this is your service instance ID.

Summary

  It is pretty simple to get information about your Bluemix account using these CLI tools.  You can use them from a terminal, but they also work from within shell scripts, allowing you to automate reports and anything else that you might frequently want to do on Bluemix.  Check out the Bluemix CLI Reference page and the CloudFoundry CLI Reference page for more CLI commands that you can use to get information for your Bluemix account, and your Bluemix services.

Advertisements

60 Minutes talks Artificial Intelligence

There is a television news show called “60 Minutes” that runs here in the US.  It runs after our Sunday football games.  I usually don’t watch the show, and rarely comment on media, but this week they had a segment on artificial intelligence.  The first part of the segment talked a lot about the history of the Watson technology, including the use of Watson on Jeopardy, and some of the different tasks that it has been put to.  There was a big emphasis on the work done around Watson for Oncology.    What they talked about a bit, but didn’t really show, was the many different ways that Watson and other artificial intelligence implementations are working in the world right now.  The first segment was pretty accurate, with only one big glaring error.  They keep referring to Watson as a “thing”, almost a single sentient being.  Watson is actually a collection of services that express various capabilities of artificial intelligence.  (Authors note: It was also really cool to see some of my Austin co-workers, like Rob High, on network television.)

The second part talks about the future of AI.  They spend a lot of time looking forward at what AI can become, and they begin to have a discussion about the ethics of artificial intelligence.  They mentioned the recent effort of the five industry leaders (Microsoft, Amazon, IBM, Facebook and Alphabet) in the ethics of artificial intelligence.  They didn’t get into anything resembling the deep conversations being held right now about displacement of workers, AI ethics, and the ultimate control of AI.  There are a lot of issues here, and they touched on some of the more “scary” scenarios, without going into any depth.

I will be interested to see what kind of feedback and reaction this gets from the “general public”.  The early reactions range from, “Do these guys understand the dangers?  Don’t they read Azimov or watch movies?” (yes – we’re extremely familiar with these things, we’re not one dimensional geeks), to people who know something about the subject wondering why they didn’t discuss neural nets and deep learning (because it’s a 30 minute show meant for public consumption).  It all comes down to educating the general public on exactly what AI does, what is doesn’t do, and what it is capable of.  That will be a long mission.  Computers and software have been around for roughly 70 years, and it’s only in the past 10 to 20 years that the general public has come to a general understanding of those.  We have a long way to go……

Watson Application Starter Kits

In an earlier blog on on learning about Watson (see Learning About Watson – Getting Started) I mentioned using the Watson Application Starter Kits (ASKs).  As I talk to and work with more developers who are looking to become familiar with the Watson cognitive services, I find that many of them seem to really like these.  So what is an ASK?

An ASK is a shared set of code and other assets that developers can use as a starting point for doing development of cognitive applications that use the Watson services.  It also provides a sample application so you can see what an end user will see.  What developers REALLY like about these ASKs is that they include real working code – and provide a starting point for some of the more common use cases being implemented with Watson (like the Answer Retrieval ASK).  You can simply fork (or download) the GitHub project containing the ASK code, and see all of the code needed for a working cognitive application. I know that a lot of bootcamp teams will use ASKs as a quick way to put together the basic infrastructure for their cognitive use cases – it gives them a starting point that executes and works.  They can then modify the UI and the business logic to fit their own needs.

This week our development team (led by Lakshmi Krishnamurthy) is releasing a new ASK.  This ASK is implemented in Node,js, and it uses the Watson Conversation service to create a Text Message Chatbot. It’s pretty simple, and you can see a quick demo of the text message chatbot online.  This can serve as a great starting point for your own work in creating a chatbot that serves a need that you have.

 

What is a Watson Bootcamp?

Note: This blog has been reprinted on the IBM developerWorks blog, under the title “What is a Watson Bootcamp?“.  Look there for the latest edits and changes to the article.

Where Do We Begin?

Many people and organizations who look to adopt and use the Watson technologies will often struggle at first.  They struggle with the idea of getting started using IBM Watson and the cognitive technologies.  Some of it is the common fear of the unknown, some of it is just not knowing where to start.  Are there things I should read?  What order should I read them in?  When we talk about enabling an entire development team or organization, the questions get tougher.  Should everyone concentrate on the same things?

One of the key methods that I have seen my team use in getting IBM Watson customers familiar with the Watson capabilities, and in how to apply them to their business problems and challenges, is through the use of a Watson Bootcamp.  These used to be called Watson Hackathons – but “hackathon” can have a negative connotation to some people, so we now refer to these as “bootcamps”.

How Does a Watson Bootcamp Work?

A Watson Bootcamp is a two day, everyone at one site, hands-on session.  It is run by two Watson developers or architects, who lead the group.  We’ll call them your “Watson Coaches”.  The attendees are a collection of roughly 20 people (the size can vary), with a mix of developers, architects, data scientists and subject matter experts (SME’s).  This group is broken into teams of 4-5 people each – with each team having at least 2 developers and 1 data scientist.  Since these teams work collaboratively, they need to be together.  Remote attendance does not work for the bootcamp, everyone needs to be physically present at one location.

Bootcamp Preparation

We begin two weeks prior to the bootcamp, the Watson Coaches will discuss potential bootcamp use cases.  Typically we like to see a list of 6-10 different potential use cases to cover in the bootcamp.  The coaches will work with you to identify the 2-5 best use cases, and the ones that will be addressed during the bootcamp.  We will also agree on logistics for the bootcamp.  You will need to have the following things:

  • A location with good internet access, that can support the development work of all of your attendees.
  • A Bluemix account where the Watson services will be created.  Individual services will need to be created for each bootcamp team (so they don’t impact each other).
  • A large room at your location for kick off activities, and for the final read-out from each bootcamp team.
  • Smaller rooms for EACH team – a space where they can work together and collaborate.

Logistics Note: You will need to reserve one BIG room that will hold all attendees for the kickoff on day 1, and for the final presentations on day 2.  You will also need to reserve SMALLER rooms (one per hack team) that will be the home for each team during the hack phase of the bootcamp.

Preparations continue during the week prior to the bootcamp, with a general session for all bootcamp attendees.  In this initial session, usually done remotely via conference call or e-meeting, the Watson Coaches will do a quick overview of the various Watson services that may be applicable to the bootcamp, and will give the attendees links to some pre-Bootcamp educational materials (here is a sample of those pre-Bootcamp educational materials).

Yes – we actually expect attendees to go through these materials!!  If they do, it will pay off for them in the long run. (hint!)

Bootcamp Execution

Then we come to the first day of our onsite bootcamp.  We get all of the attendees into the same room, and we typically provide from 2-4 hours of additional training and classroom exercises.  We will also go over successful working models with the teams, and give them ideas for how to get started.

Once the morning classroom session is complete, the attendees break up into their teams, and each team will get their own use case to implement.  You may want to assign use cases to specific teams, or you might want to let them choose use cases on their own.  It’s up to you, and what is most effective in your corporate culture.  Each team will then go off on their own, and begin to build a cognitive application using the Watson services that will implement their use case.

Teams will spend the remainder of day 1 working on their use case, and will often work into the evening.  They come back on day 2 and continue to work on implementing their use case.  While the teams are separated and working on their use cases, the Watson coaches will circulate between the teams offering guidance, technical support, and some problem solving ideas to the teams.  Often teams will segregate the work based on their roles, with each team member doing what they do best.

Bootcamp Close Out

After lunch on the second day, each team will usually spend the last hour or two of their time preparing a short slide deck with a pitch based on their cognitive application, and fixing bugs.  The last 60-90 minutes of the bootcamp consists of a series of 10-15 minute presentations done by each team.  The presentation is essentially a pitch – showing a demo of what they have built, highlighting how it could be extended and improved, and explaining what they have learned.

The presentations are usually given to a panel of judges.  The judges are a mix of business and technical leaders from the customer, and they score presentations based on some criteria.  The usual criteria that we use include the following:

  • Ability to Extend/Expand – Does the prototype appear that it will be easy to extend or 
    expand, to provide additional value to the business?  
  • Shared Knowledge – Did the presentation help educate the wider boot camp audience? Did the team share lessons learned and personal observations on the use of the Watson cognitive services?  
  • Innovation – Is the prototype or the approach used to solve the problem new and innovative?  Is this something new that has value?
  • Feasibility – Is this something that could move from prototype to product in the next 6 months?
  • “Wow” Factor – Does the prototype grab the evaluator, and provide a significant business or consumer capability?
  • Demo – was the prototype smoothly working?  Was the scenario “canned”, or did the demonstration show real cognitive capability? 
  • Entertainment – was the presentation engaging and entertaining?  Will people remember this presentation a day from now?  A month from now?  Will it “stick”?

The judges will typically score each presentation, and these scores will be collected.  Based on the scores, a “winner” for the bootcamp will be announced, and all members of the winning team will receive some sort of prize.  The prize depends on your culture.  It could be an old repurposed bowling trophy, it could be cash, vacation days, or something else.  The key is to make it valuable enough to encourage healthy competition, but not so valuable that it encourages unhealthy competition.

Why Does This Work?

This bootcamp approach seems to work for a number of reasons.  I’ll list the major reasons that I have seen, but I am sure that someone having gone through this experience might have some other reasons to add.

  • People learn best by doing things – People can learn in a passive (lecture style) environment, but they seem to learn better, and retain information better, when they learn in a “hands-on” environment, where they learn by actually doing something.
  • Competition narrows focus – the friendly competition between the teams helps to focus them on learning as much as needed, and on learning what is applicable.  Teams are under time pressure, so they don’t waste time learning about obscure product capabilities, but instead they focus on the capabilities that have value to them.
  • Team collaboration allows teams to be efficient – With a mix of roles on each team, teams can have strong resources that can cover each part of cognitive development with Watson.  Developers can learn about the importance of data in cognitive systems from data scientists – without having to struggle with doing the data curation themselves.  SME’s can learn about cognitive development, but can focus their efforts on providing their expertise to the overall system.  It allows people to learn about everything – while working within the areas where they are skilled.

This is AWESOME!!  How Do I get One of These?

You could potentially run a session like this yourself, if you have the knowledgable Watson Coaches who can help guide your teams.  If you are looking to have one of these sessions using IBM’s Watson Coaches, just reach out to me (or have your IBM representative reach out to me), and we can see about getting a session set up.

I find that the people and organizations that execute these bootcamps tend to come away from them with a MUCH better understanding of Watson and it’s capabilities.  It also gets people thinking.  Usually a couple of weeks after a bootcamp, I will begin to see question related to their new ideas about how they can apply the capabilities of Watson to solving their business problems.  The bootcamp combination of education, competition, and “learning by doing” seems to get people thinking in new and innovative ways.

Learning About Watson – Getting Started

Note: This was originally published in August 2016, I have updated it since then, with the last update made in March 2017.

Recently I have done a few hackathons/bootcamps with some different customers.  A bootcamp involves a group of developers that are split into teams of roughly 5 developers per team.  Each team gets a use case, or real world problem, to solve.  We usually spend the first half day teaching the participants about cognitive computing and how Watson services can be used.  We then spend the next day and a half doing the “hack” part of the bootcamp.  At the end of the bootcamp, each team will present their prototype, and typically a winner is chosen.

In general, a bootcamp is focused on helping people understand Watson, and then having them quickly build a prototype application that uses Watson’s cognitive capabilities to solve some kind of real-world problem.  These can be hectic, with me helping and coaching teams looking to use Watson for the first time, but they are a lot of fun.  It’s really interesting to see teams of developers come up with new and innovative ways to solve problems, and I always find it exciting to watch the teams focus on solving real world problems.  Since people learn best by DOING, it also serves as a great way to teach people about Watson, how to use it, and what it can do.  Read my post on What is a Watson Bootcamp?, to learn more about these.

After this last bootcamp I had a discussion with one of my customers on how to “best learn about Watson”.  We discussed how bootcamps can be really effective, since they force people to overcome that early apprehension whenever trying something new, and because people are able to get their “hands dirty” solving real problems.  He then asked me, “You can’t expect to run 1000 bootcamps this year – how do the people who can’t do a bootcamp learn about Watson?”.  It was a good question, and I realized that my answer was something that a lot of people might be interested in, so I figured I would share it here.

One of the first places that is good to start is relatively new, it is the IBM Learning Lab.  The site has a bunch of great resources for learning about Watson on your own.  If you’re one of those people that likes online courses, you can look at a catalog of cognitive courses that are available to you.  It’s a mix of courses from Coursera, Big Data University, Codecademy and the IBM Watson Academy.  You can browse courses based on your skill level.  Some of the courses are free, others require you to pay for them.  You can learn about Machine Learning, Data Science, Watson technology and more.  It’s a nice way to pick and choose learning opportunities for yourself.

Personally, I am more of a “hands on” learning type of person.  One of the other great features of the IBM Learning Lab is the section on Use Cases.  This section has a bunch of use cases focused on a particular Watson capability, a particular industry sector, or on some type of function.  The Pokemon Go use case is one of the most interesting (and maybe least applicable to a business problem), but there are others focused on things like virtual agents (or bots), social media analysis and response, automated systems, and others.  Just knowing the use cases is helpful, but what really makes this great is the fact that the code for an application to address each of these use cases is also available.  Having this code available means that you can look at the code to see HOW to use the Watson capabilities, and you can even use these as a rough starting point for your own cognitive application.

One other great place for getting cognitive use case ideas, and the code that implements an application to solve the use case, is the Application Starter Kits (ASK’s) page out on the Watson website.  You can look at the use cases presented here, and find a use case that helps address a real problem that you have.  These also have code available for you to use.  Often in hackathons we will see teams use these starter kits as the starting point for their application development.  The use cases here show how Watson services can be combined and use together to solve some common patterns of cognitive computing capability.

Keep in mind that nobody is going to become an expert with Watson and cognitive computing overnight, but these resources can help you effectively use your time to learn about WHAT is possible, and HOW to do it.  They will give you a great start on your journey to becoming a cognitive computing expert.

How do I Determine My Usage on Bluemix?

There are a lot of reasons that I publish a blog.  One of them is so that I can answer a question once – and then I never have to answer them again.  Recently I have been getting questions from our customers on their usage of services on Bluemix.  It’s pretty easy to do, I’ll show you how.

First you’ll need to log into your Bluemix account.  Once in there, click on your user profile, it’s in the upper right hand corner of your browser.

Bluemix_Account

Once you click on this, you will see a menu on the right hand side of your browser.  Now you will need to click on the Account option in this pane.  You should now see your account details in the main browser screen.BM_Account_Details

Now you can see a breakdown of the usage in your Bluemix account.  The main screen defaults to show usage details, and it looks like this:

UsageDetailsScreen

As you scroll down you can see a breakdown of your usage on any number of different factors.  You can see things broken out by organization, or you can scroll down and see the charges being incurred for the various services that you are using on Bluemix.  This should allow you to see what your usage has been over a two month timeframe, and give you some idea of what your costs will be.

If you look at the navigation pane on the left of your browser, you will notice an option called Notifications.  The screen looks like this:

BMNotifications

Here you can set thresholds for when you will be notified of usage.  Bluemix will send you notifications when you reach 80%, 90%, and 100% of the thresholds that you enter on this screen.  You can set spending alerts based on overall account spending, spending on runtime resources, spending on containers, spending on all services, or even set alert for specific services.  This will notify you when these limits are being approached.

So now you know how to monitor your Bluemix usage, and you also know how to set alerts for your Bluemix spending.  Now get out there and start creating your software solutions in the cloud!

Help for Managing Your Watson Bluemix Retrieve and Rank Instance

Every once in a while I see something that has the potential to save people time and aggravation.  When I see these things, I like to blog about them to help other members of the Watson cognitive community.  Yesterday I saw one of those things.

OK – I actually saw it a couple of weeks ago, while it was being tested, but it just became available to the public yesterday on the Cognitive Catalyst.  This is a sub-project for Watson under the larger IBM Open project.  If you navigate to the bottom of the IBM Open project page, you will see a variety of different resources available to developers using Watson – from a variety of different SDK’s, to the Cognitive Catalyst project.

For those of you who are not aware, the Cognitive Catalyst site has a bunch of “open source” tools and utilities that developers can use to help them in the management of their Watson services deployed on Bluemix.  All of the code for the Cognitive Catalyst projects is available via a Cognitive Catalyst GitHub project, and we encourage anyone to contribute to the projects, or to submit projects of their own.  There are some really good tools and utilities out there already.

The latest addition to these tools is the ignite-electron tool.  The author of this tool, Andrew Ayres, is a frequent contributor to the Cognitive catalyst site.  The ignite-electron tooling provides a UI which simplifies the creation and management of Retrieve & Rank (R&R) components (solr clusters/configurations/collections and rankers) while also providing an easy to use interface for the creation of ground truth.  This ability eliminates the need of using a bunch of curl commands (which you probably have in a text file and cut/paste into terminal windows), and provides a visualization of the service to reduce confusion.  The tool will eliminate the inevitable errors that can occur from copying/pasting cluster/ranker/document IDs.

That alone would be pretty valuable, but the tool will also help reduce the amount of time required for a subject matter expert (SME) to create ground truth.  Currently an SME would need to repeatedly go through the process making a curl command to query a collection, adding the question to a csv, copying document IDs to the csv, and adding relevance scores.  With the ignite-electron tool the SME can provide a list of questions, and the tool will step through those questions allowing the SME to simply assign relevance scores.  All of the POST requests, and creation of the CSV file, are handled automatically by the tool.

This is one of those simple utilities and tools that should be in the toolset of any developer or subject matter expert that uses the IBM Watson Retrieve & Rank capability.  It will make the management, maintenance, and training of your R&R instance a lot easier.