共用方式為


CommandJobLimits 類別

命令作業的限制。

繼承
azure.ai.ml.entities._job.job_limits.JobLimits
CommandJobLimits

建構函式

CommandJobLimits(*, timeout: int | str | None = None)

僅限關鍵字的參數

名稱 Description
timeout

執行持續時間上限,以秒為單位,之後作業將會取消。

範例

使用 CommandJobLimits 設定 CommandJob。


   command_job = CommandJob(
       code="./src",
       command="python train.py --ss {search_space.ss}",
       inputs={"input1": Input(path="trial.csv")},
       outputs={"default": Output(path="./foo")},
       compute="trial",
       environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu:33",
       limits=CommandJobLimits(timeout=120),
   )