简体   繁体   English

无法在 IBM Cloud 上配置 Watson OpenScale

[英]can't configure Watson OpenScale on IBM Cloud

I can't create APIClient for watson openscale.我无法为 watson openscale 创建 APIClient。 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:我正在关注下面的笔记本并停在“配置 OpenScale”部分:

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将不胜感激任何帮助

data_henrik, thanks for your investigation. data_henrik,感谢您的调查。

It turned out the default code works fine for Watson OpenScale sitting in Dallas region of IBM Cloud.事实证明,默认代码对于位于 IBM Cloud 达拉斯地区的 Watson OpenScale 运行良好。 For my instance of WOS sitting in Frankfurt, I had wrong service_url and missing url parameter.对于我在法兰克福的 WOS 实例,我有错误的 service_url 并且缺少 url 参数。 The proper configuration is following:正确的配置如下:

authenticator = IAMAuthenticator(apikey=CLOUD_API_KEY, url = "https://iam.eu-de.bluemix.net/oidc/token")
wos_client = APIClient(authenticator=authenticator, service_instance_id = "*****", 
service_url="https://eu-de.api.aiopenscale.cloud.ibm.com")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM