ImageLimitSettings Class

Limit settings for AutoML Image Verticals.

ImageLimitSettings is a class that contains the following parameters: max_concurrent_trials, max_trials, and timeout_minutes.

This is an optional configuration method to configure limits parameters such as timeouts etc.

Note

The number of concurrent runs is gated on the resources available in the specified compute target.

Ensure that the compute target has the available resources for the desired concurrency.

Tip

It's a good practice to match max_concurrent_trials count with the number of nodes in the cluster.

For example, if you have a cluster with 4 nodes, set max_concurrent_trials to 4.

Inheritance
azure.ai.ml.entities._mixins.RestTranslatableMixin
ImageLimitSettings

Constructor

ImageLimitSettings(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None)

Keyword-Only Parameters

Name Description
max_concurrent_trials

Maximum number of concurrent AutoML iterations, defaults to None.

max_trials

Represents the maximum number of trials (children jobs).

timeout_minutes

AutoML job timeout. Defaults to None

Examples

Defining the limit settings for an automl image job.


   from azure.ai.ml import automl, Input
   from azure.ai.ml.constants import AssetTypes

   # Create the AutoML job with the related factory-function.
   image_job = automl.image_instance_segmentation(
       experiment_name="my_experiment",
       compute="my_compute",
       training_data=Input(type=AssetTypes.MLTABLE, path="./training-mltable-folder"),
       validation_data=Input(type=AssetTypes.MLTABLE, path="./validation-mltable-folder"),
       target_column_name="label",
       primary_metric="MeanAveragePrecision",
       tags={"my_custom_tag": "custom value"},
   )
   # Set the limits for the AutoML job.
   image_job.set_limits(
       max_trials=10,
       max_concurrent_trials=2,
   )
   # Submit the AutoML job.
   image_job.submit()