Share via


CodeConfiguration クラス

スコアリング ジョブのコード構成。

継承
azure.ai.ml.entities._mixins.DictMixin
CodeConfiguration

コンストラクター

CodeConfiguration(code: str | PathLike | None = None, scoring_script: str | PathLike | None = None)

パラメーター

名前 説明
code
Optional[Union[<xref:azure.ai.ml.entities.Code>, str]]

スコアリング スクリプトを含むコード ディレクトリ。 コードには、Code オブジェクト、既存のコード資産の ARM リソース ID、ローカル パス、または "http:"、"https:"、またはリモートの場所を指す "azureml:" URL を指定できます。

既定値: None
scoring_script

コード ディレクトリに対するスコアリング スクリプト ファイルの相対パス。

既定値: None

BatchDeployment の CodeConfiguration の作成。


   from azure.ai.ml.entities import BatchDeployment, CodeConfiguration

   deployment = BatchDeployment(
       name="non-mlflow-deployment",
       description="this is a sample non-mlflow deployment",
       endpoint_name="my-batch-endpoint",
       model=model,
       code_configuration=CodeConfiguration(
           code="configs/deployments/model-2/onlinescoring", scoring_script="score1.py"
       ),
       environment="env",
       compute="cpu-cluster",
       instance_count=2,
       max_concurrency_per_instance=2,
       mini_batch_size=10,
       output_file_name="predictions.csv",
   )

メソッド

get
has_key
items
keys
update
values

get

get(key: Any, default: Any | None = None) -> Any

パラメーター

名前 説明
key
必須
default
既定値: None

has_key

has_key(k: Any) -> bool

パラメーター

名前 説明
k
必須

items

items() -> list

keys

keys() -> list

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> list

属性

scoring_script

コード ディレクトリに対するスコアリング スクリプト ファイルの相対パス。

戻り値

説明
str