LoginSignup
0
0

More than 5 years have passed since last update.

AzureML packageを使ってみようと思ったら、401出ちゃった時の対応

Last updated at Posted at 2016-04-14

前置き

AzureMLってそもそも何よ?

AzureMLへのインタフェースとして動く便利なパッケージです。
対象はexperiments, datasets, webservice

現在カバーしてる機能は次の4つ

  • Workspaceへの接続と管理
  • Datasetsをアップロード/ダウンロード
  • 独自関数やモデル学習を定義してウェブサービスとして公開
  • 公開しているウェブサービスを利用する

※執筆時のバージョンは0.2.10

インストール

最新版は、githubから落として来るのが良さ気です。

if(!require("devtools")) install.packages("devtools")
devtools::install_github("RevolutionAnalytics/AzureML")

CRANにも上がっているので
R
install.packages("AzureML")

でもインストールは可能です。

401エラーとその解決方法

チュートリアルの手順を写経して、動作を確認してみようとおもって、workspace()を使ったところ...

ws <- workspace(id="xxxxxx", 
          auth="xxxxxx")
Error: 401 (Unauthorised).  Please check your workspace ID and auth codes.
Request ID: 24f62e72-cc87-4668-a224-cfd61f3e9326 2016-03-10 04:38:08Z

えー… ここでつまづかなきゃいけないって…

ソースを眺めてみたところ、api_endpointにasiasoutheastを使うと明示しなきゃダメらしいです。
※今回、接続しようとしたworkspaceはasiasoutheastのリージョンで用意していました。

つまり、workspace()の引数は次のようにしなきゃダメってことです。

ws <- workspace(id = "xxxxxx", 
          auth = "xxxxxx", 
          api_endpoint = "https://asiasoutheast.studio.azureml.net/")

これで、RからAzureMLをいろいろ弄る事ができるようになります。

ENJOY!!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0