共用方式為


類別 DeployClient

azureml.deploy.DeployClient(host, auth=None, use=None)

定義用於建立部署用戶端的處理站。

具有 use 屬性的基本使用模組實作外掛程式:

從匯入參考尋找並載入 module

from azureml.deploy import DeployClient
from azureml.deploy.server import MLServer

host = 'http://localhost:12800'
ctx = ('username', 'password')
mls_client = DeployClient(host, use=MLServer, auth=ctx)

從命名空間 str 尋找並載入 use 所定義的 module

host = 'http://localhost:12800'
ctx = ('username', 'password')

mls_client = DeployClient(host, use=MLServer, auth=ctx)
mls_client = DeployClient(host, use='azureml.deploy.server.MLServer',
auth=ctx)

從檔案/路徑 Tuple 尋找並載入 module

host = 'http://localhost:12800'
ctx = ('username', 'password')

use = ('azureml.deploy.server.MLServer', '/path/to/mlserver.py')
mls_client = DeployClient(host, use=use, auth=ctx)

建立新的部署用戶端。

引數

主機

伺服器 HTTP/HTTPS 端點,包括連接埠號碼。

auth

(選擇性) 驗證內容。 並非所有部署用戶端都需要驗證。 MLServer需要auth

use

(必要) 部署實作需要使用 (ex) use='MLServer' 來使用 ML Server。