SweepJobLimits 클래스

스윕 작업에 대한 제한입니다.

상속
azure.ai.ml.entities._job.job_limits.JobLimits
SweepJobLimits

생성자

SweepJobLimits(*, max_concurrent_trials: int | None = None, max_total_trials: int | None = None, timeout: int | None = None, trial_timeout: int | str | None = None)

키워드 전용 매개 변수

Name Description
max_concurrent_trials

스윕 작업에 대한 최대 동시 평가판 수입니다.

max_total_trials

스윕 작업에 대한 총 평가판의 최대 수입니다.

timeout

작업이 취소되는 최대 실행 기간(초)입니다.

trial_timeout

각 스윕 작업 평가판에 대한 시간 제한 값(초)입니다.

예제

SweepJob에 제한 할당


   from azure.ai.ml.entities import CommandJob
   from azure.ai.ml.sweep import BayesianSamplingAlgorithm, Objective, SweepJob, SweepJobLimits

   command_job = CommandJob(
       inputs=dict(kernel="linear", penalty=1.0),
       compute=cpu_cluster,
       environment=f"{job_env.name}:{job_env.version}",
       code="./scripts",
       command="python scripts/train.py --kernel $kernel --penalty $penalty",
       experiment_name="sklearn-iris-flowers",
   )

   sweep = SweepJob(
       sampling_algorithm=BayesianSamplingAlgorithm(),
       trial=command_job,
       search_space={"ss": Choice(type="choice", values=[{"space1": True}, {"space2": True}])},
       inputs={"input1": {"file": "top_level.csv", "mode": "ro_mount"}},
       compute="top_level",
       limits=SweepJobLimits(trial_timeout=600),
       objective=Objective(goal="maximize", primary_metric="accuracy"),
   )

특성

timeout

작업이 취소되는 최대 실행 기간(초)입니다.

반환

형식 Description
int

작업이 취소되는 최대 실행 기간(초)입니다.

trial_timeout

각 스윕 작업 평가판에 대한 시간 제한 값(초)입니다.

반환

형식 Description
int

각 스윕 작업 평가판에 대한 시간 제한 값(초)입니다.