ImageInstanceSegmentationJob Class   
Configuration for AutoML Image Instance Segmentation job.
Constructor
ImageInstanceSegmentationJob(*, primary_metric: str | InstanceSegmentationPrimaryMetrics | None = None, **kwargs: Any)Keyword-Only Parameters
| Name | Description | 
|---|---|
| primary_metric | The primary metric to use for optimization. Default value: None | 
Examples
creating an automl image instance segmentation job
   from azure.ai.ml import automl, Input
   from azure.ai.ml.constants import AssetTypes
   from azure.ai.ml.automl import ObjectDetectionPrimaryMetrics
   image_instance_segmentation_job = automl.ImageInstanceSegmentationJob(
       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"),
       tags={"my_custom_tag": "My custom value"},
       primary_metric=ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION,
   )
Methods
| dump | Dumps the job content into a file in YAML format. | 
| extend_search_space | Add search space for AutoML Image Object Detection and Image Instance Segmentation tasks. | 
| set_data | Data settings for all AutoML Image jobs. | 
| set_limits | Limit settings for all AutoML Image Jobs. | 
| set_sweep | Sweep settings for all AutoML Image jobs. | 
| set_training_parameters | Setting Image training parameters for for AutoML Image Object Detection and Image Instance Segmentation tasks. | 
dump
Dumps the job content into a file in YAML format.
dump(dest: str | PathLike | IO, **kwargs: Any) -> NoneParameters
| Name | Description | 
|---|---|
| dest 
				Required
			 | The local path or file stream to write the YAML content to. If dest is a file path, a new file will be created. If dest is an open file, the file will be written to directly. | 
Exceptions
| Type | Description | 
|---|---|
| Raised if dest is a file path and the file already exists. | |
| Raised if dest is an open file and the file is not writable. | 
extend_search_space
Add search space for AutoML Image Object Detection and Image Instance Segmentation tasks.
extend_search_space(value: SearchSpace | List[SearchSpace]) -> NoneParameters
| Name | Description | 
|---|---|
| value 
				Required
			 | Search through the parameter space | 
set_data
Data settings for all AutoML Image jobs.
set_data(*, training_data: Input, target_column_name: str, validation_data: Input | None = None, validation_data_size: float | None = None) -> NoneKeyword-Only Parameters
| Name | Description | 
|---|---|
| training_data | Required. Training data. | 
| target_column_name | Required. Target column name. | 
| validation_data | Optional. Validation data. Default value: None | 
| validation_data_size | Optional. The fraction of training dataset that needs to be set aside for validation purpose. Values should be in range (0.0 , 1.0). Applied only when validation dataset is not provided. Default value: None | 
Returns
| Type | Description | 
|---|---|
| None | 
set_limits
Limit settings for all AutoML Image Jobs.
set_limits(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None) -> NoneKeyword-Only Parameters
| Name | Description | 
|---|---|
| max_concurrent_trials | Maximum number of trials to run concurrently. Default value: None | 
| max_trials | Maximum number of trials to run. Defaults to None. Default value: None | 
| timeout_minutes | AutoML job timeout. Default value: None | 
Returns
| Type | Description | 
|---|---|
| None | 
set_sweep
Sweep settings for all AutoML Image jobs.
set_sweep(*, sampling_algorithm: str | Random | Grid | Bayesian, early_termination: BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None) -> NoneKeyword-Only Parameters
| Name | Description | 
|---|---|
| sampling_algorithm | Required. Type of the hyperparameter sampling algorithms. Possible values include: "Grid", "Random", "Bayesian". | 
| early_termination | Type of early termination policy. Default value: None | 
Returns
| Type | Description | 
|---|---|
| None | 
set_training_parameters
Setting Image training parameters for for AutoML Image Object Detection and Image Instance Segmentation tasks.
set_training_parameters(*, advanced_settings: str | None = None, ams_gradient: bool | None = None, beta1: float | None = None, beta2: float | None = None, checkpoint_frequency: int | None = None, checkpoint_run_id: str | None = None, distributed: bool | None = None, early_stopping: bool | None = None, early_stopping_delay: int | None = None, early_stopping_patience: int | None = None, enable_onnx_normalization: bool | None = None, evaluation_frequency: int | None = None, gradient_accumulation_step: int | None = None, layers_to_freeze: int | None = None, learning_rate: float | None = None, learning_rate_scheduler: str | LearningRateScheduler | None = None, model_name: str | None = None, momentum: float | None = None, nesterov: bool | None = None, number_of_epochs: int | None = None, number_of_workers: int | None = None, optimizer: str | StochasticOptimizer | None = None, random_seed: int | None = None, step_lr_gamma: float | None = None, step_lr_step_size: int | None = None, training_batch_size: int | None = None, validation_batch_size: int | None = None, warmup_cosine_lr_cycles: float | None = None, warmup_cosine_lr_warmup_epochs: int | None = None, weight_decay: float | None = None, box_detections_per_image: int | None = None, box_score_threshold: float | None = None, image_size: int | None = None, max_size: int | None = None, min_size: int | None = None, model_size: str | ModelSize | None = None, multi_scale: bool | None = None, nms_iou_threshold: float | None = None, tile_grid_size: str | None = None, tile_overlap_ratio: float | None = None, tile_predictions_nms_threshold: float | None = None, validation_iou_threshold: float | None = None, validation_metric_type: str | ValidationMetricType | None = None, log_training_metrics: str | LogTrainingMetrics | None = None, log_validation_loss: str | LogValidationLoss | None = None) -> NoneKeyword-Only Parameters
| Name | Description | 
|---|---|
| advanced_settings | Settings for advanced scenarios. Default value: None | 
| ams_gradient | Enable AMSGrad when optimizer is 'adam' or 'adamw'. Default value: None | 
| beta1 | Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. Default value: None | 
| beta2 | Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. Default value: None | 
| checkpoint_frequency | Frequency to store model checkpoints. Must be a positive integer. Default value: None | 
| checkpoint_run_id | The id of a previous run that has a pretrained checkpoint for incremental training. Default value: None | 
| distributed | Whether to use distributed training. Default value: None | 
| early_stopping | Enable early stopping logic during training. Default value: None | 
| early_stopping_delay | Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer. Default value: None | 
| early_stopping_patience | Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer. Default value: None | 
| enable_onnx_normalization | Enable normalization when exporting ONNX model. Default value: None | 
| evaluation_frequency | Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. Default value: None | 
| gradient_accumulation_step | Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights while accumulating the gradients of those steps, and then using the accumulated gradients to compute the weight updates. Must be a positive integer. Default value: None | 
| layers_to_freeze | Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please see: https://free.blessedness.top/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters. # pylint: disable=line-too-long Default value: None | 
| learning_rate | Initial learning rate. Must be a float in the range [0, 1]. Default value: None | 
| learning_rate_scheduler | Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. Possible values include: "None", "WarmupCosine", "Step". Default value: None | 
| model_name | Name of the model to use for training. For more information on the available models please visit the official documentation: https://free.blessedness.top/azure/machine-learning/how-to-auto-train-image-models. Default value: None | 
| momentum | Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. Default value: None | 
| nesterov | Enable nesterov when optimizer is 'sgd'. Default value: None | 
| number_of_epochs | Number of training epochs. Must be a positive integer. Default value: None | 
| number_of_workers | Number of data loader workers. Must be a non-negative integer. Default value: None | 
| optimizer | Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". Default value: None | 
| random_seed | Random seed to be used when using deterministic training. Default value: None | 
| step_lr_gamma | Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. Default value: None | 
| step_lr_step_size | Value of step size when learning rate scheduler is 'step'. Must be a positive integer. Default value: None | 
| training_batch_size | Training batch size. Must be a positive integer. Default value: None | 
| validation_batch_size | Validation batch size. Must be a positive integer. Default value: None | 
| warmup_cosine_lr_cycles | Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. Default value: None | 
| warmup_cosine_lr_warmup_epochs | Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. Default value: None | 
| weight_decay | Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. Default value: None | 
| box_detections_per_image | Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the 'yolov5' algorithm. Default value: None | 
| box_score_threshold | During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1]. Default value: None | 
| image_size | Image size for training and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' algorithm. Default value: None | 
| max_size | Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm. Default value: None | 
| min_size | Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm. Default value: None | 
| model_size | Model size. Must be 'small', 'medium', 'large', or 'extra_large'. Note: training run may get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. Default value: None | 
| multi_scale | Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. Default value: None | 
| nms_iou_threshold | IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. Default value: None | 
| tile_grid_size | The grid size to use for tiling each image. Note: TileGridSize must not be None to enable small object detection logic. A string containing two integers in mxn format. Default value: None | 
| tile_overlap_ratio | Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Default value: None | 
| tile_predictions_nms_threshold | The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. NMS: Non-maximum suppression. Default value: None | 
| validation_iou_threshold | IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. Default value: None | 
| validation_metric_type | Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. Default value: None | 
| log_training_metrics | 
				str or 
				<xref:azure.mgmt.machinelearningservices.models.LogTrainingMetrics>
		 indicates whether or not to log training metrics. Must be 'Enable' or 'Disable' Default value: None | 
| log_validation_loss | 
				str or 
				<xref:azure.mgmt.machinelearningservices.models.LogValidationLoss>
		 indicates whether or not to log validation loss. Must be 'Enable' or 'Disable' Default value: None | 
Attributes
base_path
creation_context
The creation context of the resource.
Returns
| Type | Description | 
|---|---|
| The creation metadata for the resource. | 
id
inputs
limits
Returns the limit settings for all AutoML Image jobs.
Returns
| Type | Description | 
|---|---|
| The limit settings. | 
log_files
log_verbosity
Returns the verbosity of the logger.
Returns
| Type | Description | 
|---|---|
| 
							<xref:azure.ai.ml._restclient.v2023_04_01_preview.models.LogVerbosity>
						 | The log verbosity. | 
outputs
primary_metric
search_space
status
The status of the job.
Common values returned include "Running", "Completed", and "Failed". All possible values are:
- NotStarted - This is a temporary state that client-side Run objects are in before cloud submission. 
- Starting - The Run has started being processed in the cloud. The caller has a run ID at this point. 
- Provisioning - On-demand compute is being created for a given job submission. 
- Preparing - The run environment is being prepared and is in one of two stages: - Docker image build 
- conda environment setup 
 
- Queued - The job is queued on the compute target. For example, in BatchAI, the job is in a queued state - while waiting for all the requested nodes to be ready. 
- Running - The job has started to run on the compute target. 
- Finalizing - User code execution has completed, and the run is in post-processing stages. 
- CancelRequested - Cancellation has been requested for the job. 
- Completed - The run has completed successfully. This includes both the user code execution and run - post-processing stages. 
- Failed - The run failed. Usually the Error property on a run will provide details as to why. 
- Canceled - Follows a cancellation request and indicates that the run is now successfully cancelled. 
- NotResponding - For runs that have Heartbeats enabled, no heartbeat has been recently sent. 
Returns
| Type | Description | 
|---|---|
| Status of the job. | 
studio_url
sweep
Returns the sweep settings for all AutoML Image jobs.
Returns
| Type | Description | 
|---|---|
| The sweep settings. | 
task_type
Get task type.
Returns
| Type | Description | 
|---|---|
| The type of task to run. Possible values include: "classification", "regression", "forecasting". |