问题
I am using IBM Watson APIs to create intents and user examples and I want to know how to track the training status after creating a new intent and user examples.
回答1:
To track the status from within the UI, open the "Try it out" panel. It will display "Watson is training". When complete it will stop.
Programatically, you can use the Workspace API to query the workspace. For example in Python.
from watson_developer_cloud import ConversationV1
url = "https://gateway-fra.watsonplatform.net/conversation/api"
username = "USERNAME"
password = "PASSWORD"
workspace_id = '2d5e7dd4-19fe-4ab3-9c3e-f2eff48c9ca4'
conv = ConversationV1(
username=username,
password=password,
version='2017-05-26',
url=url
)
response = conv.get_workspace(workspace_id=workspace, export=False)
print('Status is: {}'.format(response['status']))
来源:https://stackoverflow.com/questions/46785420/ibm-watson-conversation-training-status-api