-
Notifications
You must be signed in to change notification settings - Fork 232
/
azure.ai.ml.automl.ImageClassificationJob.yml
485 lines (446 loc) · 19 KB
/
azure.ai.ml.automl.ImageClassificationJob.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
### YamlMime:PythonClass
uid: azure.ai.ml.automl.ImageClassificationJob
name: ImageClassificationJob
fullName: azure.ai.ml.automl.ImageClassificationJob
module: azure.ai.ml.automl
inheritances:
- azure.ai.ml.entities._job.automl.image.automl_image_classification_base.AutoMLImageClassificationBase
summary: Configuration for AutoML multi-class Image Classification job.
constructor:
syntax: 'ImageClassificationJob(*, primary_metric: str | ClassificationPrimaryMetrics
| None = None, **kwargs: Any)'
parameters:
- name: primary_metric
description: The primary metric to use for optimization.
isRequired: true
types:
- <xref:typing.Optional>[<xref:str>, <xref:azure.ai.ml.automl.ClassificationMultilabelPrimaryMetrics>]
- name: kwargs
description: Job-specific arguments.
isRequired: true
types:
- <xref:typing.Dict>[<xref:str>, <xref:typing.Any>]
keywordOnlyParameters:
- name: primary_metric
isRequired: true
examples:
- "creating an automl image classification job<!--[!code-python[Main](les\\ml_samples_automl_image.py\
\ )]-->\n\n<!-- literal_block {\"ids\": [], \"classes\": [], \"names\": [], \"dupnames\"\
: [], \"backrefs\": [], \"source\": \"C:\\\\hostedtoolcache\\\\windows\\\\Python\\\
\\3.11.9\\\\x64\\\\Lib\\\\site-packages\\\\py2docfx\\\\dist_temp\\\\8\\\\azure-ai-ml-1.16.1\\\
\\samples\\\\ml_samples_automl_image.py\", \"xml:space\": \"preserve\", \"force\"\
: false, \"language\": \"python\", \"highlight_args\": {\"linenostart\": 1}, \"\
linenos\": false} -->\n\n````python\n\n from azure.ai.ml import automl, Input\n\
\ from azure.ai.ml.constants import AssetTypes\n from azure.ai.ml.automl import\
\ ClassificationMultilabelPrimaryMetrics\n\n image_classification_job = automl.ImageClassificationJob(\n\
\ experiment_name=\"my_experiment\",\n compute=\"my_compute\",\n \
\ training_data=Input(type=AssetTypes.MLTABLE, path=\"./training-mltable-folder\"\
),\n validation_data=Input(type=AssetTypes.MLTABLE, path=\"./validation-mltable-folder\"\
),\n target_column_name=\"label\",\n primary_metric=ClassificationMultilabelPrimaryMetrics.ACCURACY,\n\
\ tags={\"my_custom_tag\": \"My custom value\"},\n )\n\n ````\n"
methods:
- uid: azure.ai.ml.automl.ImageClassificationJob.dump
name: dump
summary: Dumps the job content into a file in YAML format.
signature: 'dump(dest: str | PathLike | IO, **kwargs: Any) -> None'
parameters:
- name: dest
description: '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.'
isRequired: true
types:
- <xref:typing.Union>[<xref:PathLike>, <xref:str>, <xref:typing.IO>[<xref:typing.AnyStr>]]
exceptions:
- type: FileExistsError
description: Raised if dest is a file path and the file already exists.
- type: IOError
description: Raised if dest is an open file and the file is not writable.
- uid: azure.ai.ml.automl.ImageClassificationJob.extend_search_space
name: extend_search_space
summary: Add Search space for AutoML Image Classification and Image Classification
Multilabel tasks.
signature: 'extend_search_space(value: SearchSpace | List[SearchSpace]) -> None'
parameters:
- name: value
description: 'specify either an instance of ImageClassificationSearchSpace or
list of
ImageClassificationSearchSpace for searching through the parameter space'
isRequired: true
types:
- <xref:typing.Union>[<xref:azure.ai.ml.automl.ImageClassificationSearchSpace>,
<xref:typing.List>[<xref:azure.ai.ml.automl.ImageClassificationSearchSpace>]]
- uid: azure.ai.ml.automl.ImageClassificationJob.set_data
name: set_data
summary: Data settings for all AutoML Image jobs.
signature: 'set_data(*, training_data: Input, target_column_name: str, validation_data:
Input | None = None, validation_data_size: float | None = None) -> None'
keywordOnlyParameters:
- name: training_data
description: Required. Training data.
- name: target_column_name
description: Required. Target column name.
- name: validation_data
description: Optional. Validation data.
- name: validation_data_size
description: '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.'
return:
description: None
- uid: azure.ai.ml.automl.ImageClassificationJob.set_limits
name: set_limits
summary: Limit settings for all AutoML Image Jobs.
signature: 'set_limits(*, max_concurrent_trials: int | None = None, max_trials:
int | None = None, timeout_minutes: int | None = None) -> None'
keywordOnlyParameters:
- name: max_concurrent_trials
description: Maximum number of trials to run concurrently.
- name: max_trials
description: Maximum number of trials to run. Defaults to None.
- name: timeout_minutes
description: AutoML job timeout.
return:
description: None
- uid: azure.ai.ml.automl.ImageClassificationJob.set_sweep
name: set_sweep
summary: Sweep settings for all AutoML Image jobs.
signature: 'set_sweep(*, sampling_algorithm: str | Random | Grid | Bayesian, early_termination:
BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None)
-> None'
keywordOnlyParameters:
- name: sampling_algorithm
description: 'Required. Type of the hyperparameter sampling
algorithms. Possible values include: "Grid", "Random", "Bayesian".'
- name: early_termination
description: Type of early termination policy.
return:
description: None
- uid: azure.ai.ml.automl.ImageClassificationJob.set_training_parameters
name: set_training_parameters
summary: Setting Image training parameters for AutoML Image Classification and Image
Classification Multilabel tasks.
signature: '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, training_crop_size: int
| None = None, validation_crop_size: int | None = None, validation_resize_size:
int | None = None, weighted_loss: int | None = None) -> None'
keywordOnlyParameters:
- name: advanced_settings
description: Settings for advanced scenarios.
types:
- <xref:str>
- name: ams_gradient
description: Enable AMSGrad when optimizer is 'adam' or 'adamw'.
types:
- <xref:bool>
- name: beta1
description: 'Value of ''beta1'' when optimizer is ''adam'' or ''adamw''. Must
be a float in the
range [0, 1].'
types:
- <xref:float>
- name: beta2
description: 'Value of ''beta2'' when optimizer is ''adam'' or ''adamw''. Must
be a float in the
range [0, 1].'
types:
- <xref:float>
- name: checkpoint_frequency
description: 'Frequency to store model checkpoints. Must be a positive
integer.'
types:
- <xref:int>
- name: checkpoint_run_id
description: 'The id of a previous run that has a pretrained checkpoint for
incremental training.'
types:
- <xref:str>
- name: distributed
description: Whether to use distributed training.
types:
- <xref:bool>
- name: early_stopping
description: Enable early stopping logic during training.
types:
- <xref:bool>
- name: early_stopping_delay
description: 'Minimum number of epochs or validation evaluations to wait
before primary metric improvement
is tracked for early stopping. Must be a positive integer.'
types:
- <xref:int>
- name: early_stopping_patience
description: 'Minimum number of epochs or validation evaluations with no
primary metric improvement before
the run is stopped. Must be a positive integer.'
types:
- <xref:int>
- name: enable_onnx_normalization
description: Enable normalization when exporting ONNX model.
types:
- <xref:bool>
- name: evaluation_frequency
description: 'Frequency to evaluate validation dataset to get metric scores.
Must be a positive integer.'
types:
- <xref:int>
- name: gradient_accumulation_step
description: '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.'
types:
- <xref:int>
- name: layers_to_freeze
description: '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://docs.microsoft.com/en-us/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters](https://docs.microsoft.com/en-us/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters). #
pylint: disable=line-too-long'
- name: learning_rate
description: Initial learning rate. Must be a float in the range [0, 1].
types:
- <xref:float>
- name: learning_rate_scheduler
description: 'Type of learning rate scheduler. Must be ''warmup_cosine'' or
''step''. Possible values include: "None", "WarmupCosine", "Step".'
- name: model_name
description: 'Name of the model to use for training.
For more information on the available models please visit the official documentation:
[https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models](https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models).'
- name: momentum
description: 'Value of momentum when optimizer is ''sgd''. Must be a float in
the range [0,
1].'
types:
- <xref:float>
- name: nesterov
description: Enable nesterov when optimizer is 'sgd'.
types:
- <xref:bool>
- name: number_of_epochs
description: Number of training epochs. Must be a positive integer.
types:
- <xref:int>
- name: number_of_workers
description: Number of data loader workers. Must be a non-negative integer.
types:
- <xref:int>
- name: optimizer
description: 'Type of optimizer. Possible values include: "None", "Sgd", "Adam",
"Adamw".'
- name: random_seed
description: Random seed to be used when using deterministic training.
types:
- <xref:int>
- name: step_lr_gamma
description: 'Value of gamma when learning rate scheduler is ''step''. Must be
a float
in the range [0, 1].'
types:
- <xref:float>
- name: step_lr_step_size
description: 'Value of step size when learning rate scheduler is ''step''. Must
be
a positive integer.'
types:
- <xref:int>
- name: training_batch_size
description: Training batch size. Must be a positive integer.
types:
- <xref:int>
- name: validation_batch_size
description: Validation batch size. Must be a positive integer.
types:
- <xref:int>
- name: warmup_cosine_lr_cycles
description: 'Value of cosine cycle when learning rate scheduler is
''warmup_cosine''. Must be a float in the range [0, 1].'
types:
- <xref:float>
- name: warmup_cosine_lr_warmup_epochs
description: 'Value of warmup epochs when learning rate scheduler is
''warmup_cosine''. Must be a positive integer.'
types:
- <xref:int>
- name: weight_decay
description: 'Value of weight decay when optimizer is ''sgd'', ''adam'', or ''adamw''.
Must
be a float in the range[0, 1].'
types:
- <xref:float>
- name: training_crop_size
description: 'Image crop size that is input to the neural network for the
training dataset. Must be a positive integer.'
types:
- <xref:int>
- name: validation_crop_size
description: 'Image crop size that is input to the neural network for the
validation dataset. Must be a positive integer.'
types:
- <xref:int>
- name: validation_resize_size
description: 'Image size to which to resize before cropping for validation
dataset. Must be a positive integer.'
types:
- <xref:int>
- name: weighted_loss
description: 'Weighted loss. The accepted values are 0 for no weighted loss.
1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights.
Must be
0 or 1 or 2.'
types:
- <xref:int>
attributes:
- uid: azure.ai.ml.automl.ImageClassificationJob.base_path
name: base_path
summary: The base path of the resource.
return:
description: The base path of the resource.
types:
- <xref:str>
- uid: azure.ai.ml.automl.ImageClassificationJob.creation_context
name: creation_context
summary: The creation context of the resource.
return:
description: The creation metadata for the resource.
types:
- <xref:typing.Optional>[<xref:azure.ai.ml.entities.SystemData>]
- uid: azure.ai.ml.automl.ImageClassificationJob.id
name: id
summary: The resource ID.
return:
description: The global ID of the resource, an Azure Resource Manager (ARM) ID.
types:
- <xref:typing.Optional>[<xref:str>]
- uid: azure.ai.ml.automl.ImageClassificationJob.inputs
name: inputs
- uid: azure.ai.ml.automl.ImageClassificationJob.limits
name: limits
summary: Returns the limit settings for all AutoML Image jobs.
return:
description: The limit settings.
types:
- <xref:azure.ai.ml.automl.ImageLimitSettings>
- uid: azure.ai.ml.automl.ImageClassificationJob.log_files
name: log_files
summary: Job output files.
return:
description: The dictionary of log names and URLs.
types:
- <xref:typing.Optional>[<xref:typing.Dict>[<xref:str>, <xref:str>]]
- uid: azure.ai.ml.automl.ImageClassificationJob.log_verbosity
name: log_verbosity
summary: Returns the verbosity of the logger.
return:
description: The log verbosity.
types:
- <xref:azure.ai.ml._restclient.v2023_04_01_preview.models.LogVerbosity>
- uid: azure.ai.ml.automl.ImageClassificationJob.outputs
name: outputs
- uid: azure.ai.ml.automl.ImageClassificationJob.primary_metric
name: primary_metric
- uid: azure.ai.ml.automl.ImageClassificationJob.search_space
name: search_space
summary: 'List[~azure.ai.ml.automl.ImageClassificationSearchSpace]
:return: Search space for AutoML Image Classification and Image Classification
Multilabel tasks.'
- uid: azure.ai.ml.automl.ImageClassificationJob.status
name: status
summary: "The status of the job.\n\nCommon values returned include \"Running\",\
\ \"Completed\", and \"Failed\". All possible values are:\n\n * NotStarted -\
\ This is a temporary state that client-side Run objects are in before cloud submission.\
\ \n\n * Starting - The Run has started being processed in the cloud. The caller\
\ has a run ID at this point. \n\n * Provisioning - On-demand compute is being\
\ created for a given job submission. \n\n * Preparing - The run environment\
\ is being prepared and is in one of two stages:\n\n * Docker image build\
\ \n\n * conda environment setup \n\n * Queued - The job is queued on\
\ the compute target. For example, in BatchAI, the job is in a queued state\n\n\
\ while waiting for all the requested nodes to be ready.\n\n * Running\
\ - The job has started to run on the compute target. \n\n * Finalizing - User\
\ code execution has completed, and the run is in post-processing stages. \n\n\
\ * CancelRequested - Cancellation has been requested for the job. \n\n *\
\ Completed - The run has completed successfully. This includes both the user\
\ code execution and run\n\n post-processing stages.\n\n * Failed - The\
\ run failed. Usually the Error property on a run will provide details as to why.\
\ \n\n * Canceled - Follows a cancellation request and indicates that the run\
\ is now successfully cancelled. \n\n * NotResponding - For runs that have Heartbeats\
\ enabled, no heartbeat has been recently sent."
return:
description: Status of the job.
types:
- <xref:typing.Optional>[<xref:str>]
- uid: azure.ai.ml.automl.ImageClassificationJob.studio_url
name: studio_url
summary: Azure ML studio endpoint.
return:
description: The URL to the job details page.
types:
- <xref:typing.Optional>[<xref:str>]
- uid: azure.ai.ml.automl.ImageClassificationJob.sweep
name: sweep
summary: Returns the sweep settings for all AutoML Image jobs.
return:
description: The sweep settings.
types:
- <xref:azure.ai.ml.automl.ImageSweepSettings>
- uid: azure.ai.ml.automl.ImageClassificationJob.task_type
name: task_type
summary: Get task type.
return:
description: 'The type of task to run. Possible values include: "classification",
"regression", "forecasting".'
types:
- <xref:str>
- uid: azure.ai.ml.automl.ImageClassificationJob.test_data
name: test_data
summary: Get test data.
return:
description: Test data input
types:
- <xref:azure.ai.ml.Input>
- uid: azure.ai.ml.automl.ImageClassificationJob.training_data
name: training_data
summary: Get training data.
return:
description: Training data input
types:
- <xref:azure.ai.ml.Input>
- uid: azure.ai.ml.automl.ImageClassificationJob.training_parameters
name: training_parameters
summary: '~azure.ai.ml.automl.ImageModelSettingsClassification
:return: Training parameters for AutoML Image Classification and Image Classification
Multilabel tasks.'
- uid: azure.ai.ml.automl.ImageClassificationJob.type
name: type
summary: The type of the job.
return:
description: The type of the job.
types:
- <xref:typing.Optional>[<xref:str>]
- uid: azure.ai.ml.automl.ImageClassificationJob.validation_data
name: validation_data
summary: Get validation data.
return:
description: Validation data input
types:
- <xref:azure.ai.ml.Input>