Reputation: 23
I can’t create APIClient for watson openscale. I get message:
AuthorizationError: You are not authorized to access AI OpenScale instance ***
I am following the notebook below and stopped at ‘Configure OpenScale’ part:
https://github.com/IBM/watson-openscale-samples/blob/main/IBM%20Cloud/WML/notebooks/binary/spark/Watson%20OpenScale%20and%20Watson%20ML%20Engine.ipynb
I am failing on :
wos_client = APIClient(service_url='https://api.aiopenscale.cloud.ibm.com', service_instance_id='***', authenticator=IAMAuthenticator(apikey=CLOUD_API_KEY))
Will be grateful for any help
Upvotes: 0
Views: 332
Reputation: 23
data_henrik, thanks for your investigation.
It turned out the default code works fine for Watson OpenScale sitting in Dallas region of IBM Cloud. For my instance of WOS sitting in Frankfurt, I had wrong service_url and missing url parameter. The proper configuration is following:
authenticator = IAMAuthenticator(apikey=CLOUD_API_KEY, url = "https://iam.cloud.ibm.com/identity/token")
wos_client = APIClient(authenticator=authenticator, service_instance_id = "*****",
service_url="https://eu-de.api.aiopenscale.cloud.ibm.com")
I have refreshed authenticator url, the old one stopped working.
Upvotes: 1