你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CommandJobLimits Class

Limits for Command Jobs.

Inheritance
azure.ai.ml.entities._job.job_limits.JobLimits
CommandJobLimits

Constructor

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

Keyword-Only Parameters

Name Description
timeout

The maximum run duration, in seconds, after which the job will be cancelled.

Examples

Configuring a CommandJob with CommandJobLimits.


   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),
   )