azure.ai.ml.automl package¶
Contains automated machine learning classes for Azure Machine Learning SDKv2.
Main areas include managing AutoML tasks.
- class azure.ai.ml.automl.BlockedTransformers(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Enum for all classification models supported by AutoML.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- CAT_TARGET_ENCODER = 'CatTargetEncoder'¶
Target encoding for categorical data.
- COUNT_VECTORIZER = 'CountVectorizer'¶
Count Vectorizer converts a collection of text documents to a matrix of token counts.
- HASH_ONE_HOT_ENCODER = 'HashOneHotEncoder'¶
Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features.
- LABEL_ENCODER = 'LabelEncoder'¶
Label encoder converts labels/categorical variables in a numerical form.
- NAIVE_BAYES = 'NaiveBayes'¶
Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed.
- ONE_HOT_ENCODER = 'OneHotEncoder'¶
Ohe hot encoding creates a binary feature transformation.
- TEXT_TARGET_ENCODER = 'TextTargetEncoder'¶
Target encoding for text data.
- TF_IDF = 'TfIdf'¶
Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents.
- WORD_EMBEDDING = 'WordEmbedding'¶
Word embedding helps represents words or phrases as a vector, or a series of numbers.
- WO_E_TARGET_ENCODER = 'WoETargetEncoder'¶
Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights.
- class azure.ai.ml.automl.ClassificationJob(*, primary_metric: str | None = None, positive_label: str | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Classification Job.
- Keyword Arguments:
primary_metric (Optional[str]) – The primary metric to use for optimization, defaults to None
positive_label (Optional[str]) – Positive label for binary metrics calculation, defaults to None
featurization (Optional[TabularFeaturizationSettings]) – Featurization settings. Defaults to None.
limits (Optional[TabularLimitSettings]) – Limits settings. Defaults to None.
training (Optional[TrainingSettings]) – Training settings. Defaults to None.
- Returns:
An instance of ClassificationJob object.
- Return type:
ClassificationJob
- Raises:
ValueError – If primary_metric is not a valid primary metric
ValueError – If positive_label is not a valid positive label
ValueError – If featurization is not a valid featurization settings
ValueError – If limits is not a valid limits settings
ValueError – If training is not a valid training settings
Initialize a new AutoML Classification task.
- Keyword Arguments:
primary_metric (Optional[str]) – The primary metric to use for optimization, defaults to None
positive_label (Optional[str]) – Positive label for binary metrics calculation, defaults to None
featurization (Optional[TabularFeaturizationSettings]) – featurization settings. Defaults to None.
limits (Optional[TabularLimitSettings]) – limits settings. Defaults to None.
training (Optional[TrainingSettings]) – training settings. Defaults to None.
- Raises:
ValueError – If primary_metric is not a valid primary metric
ValueError – If positive_label is not a valid positive label
ValueError – If featurization is not a valid featurization settings
ValueError – If limits is not a valid limits settings
ValueError – If training is not a valid training settings
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- set_data(*, training_data: Input, target_column_name: str, weight_column_name: str | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, n_cross_validations: str | int | None = None, cv_split_column_names: List[str] | None = None, test_data: Input | None = None, test_data_size: float | None = None) None¶
Define data configuration.
- Keyword Arguments:
training_data (Input) – Training data.
target_column_name (str) – Column name of the target column.
weight_column_name (Optional[str]) – Weight column name, defaults to None
validation_data (Optional[Input]) – Validation data, defaults to None
validation_data_size (Optional[float]) – Validation data size, defaults to None
n_cross_validations (Optional[Union[str, int]]) – n_cross_validations, defaults to None
cv_split_column_names (Optional[List[str]]) – cv_split_column_names, defaults to None
test_data_size (Optional[float]) – Test data size, defaults to None
- set_featurization(*, blocked_transformers: List[BlockedTransformers | str] | None = None, column_name_and_types: Dict[str, str] | None = None, dataset_language: str | None = None, transformer_params: Dict[str, List[ColumnTransformer]] | None = None, mode: str | None = None, enable_dnn_featurization: bool | None = None) None¶
Define feature engineering configuration.
- Keyword Arguments:
blocked_transformers (Optional[List[Union[BlockedTransformers, str]]]) – A list of transformer names to be blocked during featurization, defaults to None
column_name_and_types (Optional[Dict[str, str]]) – A dictionary of column names and feature types used to update column purpose , defaults to None
dataset_language (Optional[str]) – Three character ISO 639-3 code for the language(s) contained in the dataset. Languages other than English are only supported if you use GPU-enabled compute. The language_code ‘mul’ should be used if the dataset contains multiple languages. To find ISO 639-3 codes for different languages, please refer to https://en.wikipedia.org/wiki/List_of_ISO_639-3_codes, defaults to None
transformer_params (Optional[Dict[str, List[ColumnTransformer]]]) – A dictionary of transformer and corresponding customization parameters , defaults to None
mode (Optional[str]) – “off”, “auto”, defaults to “auto”, defaults to None
enable_dnn_featurization (Optional[bool]) – Whether to include DNN based feature engineering methods, defaults to None
- set_limits(*, enable_early_termination: bool | None = None, exit_score: float | None = None, max_concurrent_trials: int | None = None, max_cores_per_trial: int | None = None, max_nodes: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None) None¶
Set limits for the job.
- Keyword Arguments:
enable_early_termination (Optional[bool]) –
Whether to enable early termination if the score is not improving in the short term, defaults to None.
Early stopping logic:
No early stopping for first 20 iterations (landmarks).
- Early stopping window starts on the 21st iteration and looks for early_stopping_n_iters iterations
(currently set to 10). This means that the first iteration where stopping can occur is the 31st.
AutoML still schedules 2 ensemble iterations AFTER early stopping, which might result in higher scores.
- Early stopping is triggered if the absolute value of best score calculated is the same for past
early_stopping_n_iters iterations, that is, if there is no improvement in score for early_stopping_n_iters iterations.
exit_score (Optional[float]) – Target score for experiment. The experiment terminates after this score is reached. If not specified (no criteria), the experiment runs until no further progress is made on the primary metric. For for more information on exit criteria, see this article , defaults to None
max_concurrent_trials (Optional[int]) –
This is the maximum number of iterations that would be executed in parallel. The default value is 1.
- AmlCompute clusters support one iteration running per node. For multiple AutoML experiment parent runs
executed in parallel on a single AmlCompute cluster, the sum of the
max_concurrent_trialsvalues for all experiments should be less than or equal to the maximum number of nodes. Otherwise, runs will be queued until nodes are available.
- DSVM supports multiple iterations per node.
max_concurrent_trialsshould be less than or equal to the number of cores on the DSVM. For multiple experiments run in parallel on a single DSVM, the sum of the
max_concurrent_trialsvalues for all experiments should be less than or equal to the maximum number of nodes.
- DSVM supports multiple iterations per node.
- Databricks -
max_concurrent_trialsshould be less than or equal to the number of worker nodes on Databricks.
- Databricks -
max_concurrent_trialsdoes not apply to local runs. Formerly, this parameter was namedconcurrent_iterations.max_cores_per_trial (Optional[int]) –
The maximum number of threads to use for a given training iteration. Acceptable values:
Greater than 1 and less than or equal to the maximum number of cores on the compute target.
Equal to -1, which means to use all the possible cores per iteration per child-run.
Equal to 1, the default.
[Experimental] The maximum number of nodes to use for distributed training.
For forecasting, each model is trained using max(2, int(max_nodes / max_concurrent_trials)) nodes.
For classification/regression, each model is trained using max_nodes nodes.
Note- This parameter is in public preview and might change in future.
max_trials (Optional[int]) – The total number of different algorithm and parameter combinations to test during an automated ML experiment. If not specified, the default is 1000 iterations.
timeout_minutes (Optional[int]) – Maximum amount of time in minutes that all iterations combined can take before the experiment terminates. If not specified, the default experiment timeout is 6 days. To specify a timeout less than or equal to 1 hour, make sure your dataset’s size is not greater than 10,000,000 (rows times column) or an error results, defaults to None
trial_timeout_minutes (Optional[int]) – Maximum time in minutes that each iteration can run for before it terminates. If not specified, a value of 1 month or 43200 minutes is used, defaults to None
- set_training(*, enable_onnx_compatible_models: bool | None = None, enable_dnn_training: bool | None = None, enable_model_explainability: bool | None = None, enable_stack_ensemble: bool | None = None, enable_vote_ensemble: bool | None = None, stack_ensemble_settings: StackEnsembleSettings | None = None, ensemble_model_download_timeout: int | None = None, allowed_training_algorithms: List[str] | None = None, blocked_training_algorithms: List[str] | None = None, training_mode: str | TrainingMode | None = None) None¶
The method to configure training related settings.
- Keyword Arguments:
enable_onnx_compatible_models (Optional[bool]) – Whether to enable or disable enforcing the ONNX-compatible models. The default is False. For more information about Open Neural Network Exchange (ONNX) and Azure Machine Learning,see this article.
enable_dnn_training (Optional[bool]) – Whether to include DNN based models during model selection. However, the default is True for DNN NLP tasks, and it’s False for all other AutoML tasks.
enable_model_explainability (Optional[bool]) – Whether to enable explaining the best AutoML model at the end of all AutoML training iterations. For more information, see Interpretability: model explanations in automated machine learning. , defaults to None
enable_stack_ensemble (Optional[bool]) – Whether to enable/disable StackEnsemble iteration. If enable_onnx_compatible_models flag is being set, then StackEnsemble iteration will be disabled. Similarly, for Timeseries tasks, StackEnsemble iteration will be disabled by default, to avoid risks of overfitting due to small training set used in fitting the meta learner. For more information about ensembles, see Ensemble configuration , defaults to None
enable_vote_ensemble (Optional[bool]) – Whether to enable/disable VotingEnsemble iteration. For more information about ensembles, see Ensemble configuration , defaults to None
stack_ensemble_settings (Optional[StackEnsembleSettings]) – Settings for StackEnsemble iteration, defaults to None
ensemble_model_download_timeout (Optional[int]) – During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. Configure this parameter with a higher value than 300 secs, if more time is needed, defaults to None
allowed_training_algorithms (Optional[List[str]]) – A list of model names to search for an experiment. If not specified, then all models supported for the task are used minus any specified in
blocked_training_algorithmsor deprecated TensorFlow models, defaults to Noneblocked_training_algorithms (Optional[List[str]]) – A list of algorithms to ignore for an experiment, defaults to None
training_mode (Optional[Union[str, azure.ai.ml.constants.TabularTrainingMode]]) –
[Experimental] The training mode to use. The possible values are-
distributed- enables distributed training for supported algorithms.
non_distributed- disables distributed training.
auto- Currently, it is same as non_distributed. In future, this might change.
Note: This parameter is in public preview and may change in future.
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property featurization: TabularFeaturizationSettings | None¶
Get the tabular featurization settings for the AutoML job.
- Returns:
Tabular featurization settings for the AutoML job
- Return type:
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: TabularLimitSettings | None¶
Get the tabular limits for the AutoML job.
- Returns:
Tabular limits for the AutoML job
- Return type:
- property log_verbosity: LogVerbosity¶
Get the log verbosity for the AutoML job.
- Returns:
log verbosity for the AutoML job
- Return type:
LogVerbosity
- property primary_metric: str | ClassificationPrimaryMetrics¶
The primary metric to use for optimization.
- Returns:
The primary metric to use for optimization.
- Return type:
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training: ClassificationTrainingSettings¶
Training Settings for AutoML Classification Job.
- Returns:
Training settings used for AutoML Classification Job.
- Return type:
ClassificationTrainingSettings
- class azure.ai.ml.automl.ClassificationModels(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Enum for all classification models supported by AutoML.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- BERNOULLI_NAIVE_BAYES = 'BernoulliNaiveBayes'¶
Naive Bayes classifier for multivariate Bernoulli models.
- DECISION_TREE = 'DecisionTree'¶
Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features.
- EXTREME_RANDOM_TREES = 'ExtremeRandomTrees'¶
Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.
- GRADIENT_BOOSTING = 'GradientBoosting'¶
The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.
- KNN = 'KNN'¶
K-nearest neighbors (KNN) algorithm uses ‘feature similarity’ to predict the values of new datapoints which further means that the new data point will be assigned a value based on how closely it matches the points in the training set.
- LIGHT_GBM = 'LightGBM'¶
LightGBM is a gradient boosting framework that uses tree based learning algorithms.
- LINEAR_SVM = 'LinearSVM'¶
A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. After giving an SVM model sets of labeled training data for each category, they’re able to categorize new text. Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph.
- LOGISTIC_REGRESSION = 'LogisticRegression'¶
Logistic regression is a fundamental classification technique. It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. Logistic regression is fast and relatively uncomplicated, and it’s convenient for you to interpret the results. Although it’s essentially a method for binary classification, it can also be applied to multiclass problems.
- MULTINOMIAL_NAIVE_BAYES = 'MultinomialNaiveBayes'¶
The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work.
- RANDOM_FOREST = 'RandomForest'¶
Random forest is a supervised learning algorithm. The “forest” it builds, is an ensemble of decision trees, usually trained with the bagging method. The general idea of the bagging method is that a combination of learning models increases the overall result.
- SGD = 'SGD'¶
Stochastic gradient descent is an optimization algorithm often used in machine learning applications to find the model parameters that correspond to the best fit between predicted and actual outputs.
- Type:
SGD
- SVM = 'SVM'¶
A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. After giving an SVM model sets of labeled training data for each category, they’re able to categorize new text.
- XG_BOOST_CLASSIFIER = 'XGBoostClassifier'¶
Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values.
- Type:
XGBoost
- class azure.ai.ml.automl.ClassificationMultilabelPrimaryMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Primary metrics for classification multilabel tasks.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- ACCURACY = 'Accuracy'¶
Accuracy is the ratio of predictions that exactly match the true class labels.
- AUC_WEIGHTED = 'AUCWeighted'¶
AUC is the Area under the curve. This metric represents arithmetic mean of the score for each class, weighted by the number of true instances in each class.
- AVERAGE_PRECISION_SCORE_WEIGHTED = 'AveragePrecisionScoreWeighted'¶
The arithmetic mean of the average precision score for each class, weighted by the number of true instances in each class.
- IOU = 'IOU'¶
Intersection Over Union. Intersection of predictions divided by union of predictions.
- NORM_MACRO_RECALL = 'NormMacroRecall'¶
Normalized macro recall is recall macro-averaged and normalized, so that random performance has a score of 0, and perfect performance has a score of 1.
- PRECISION_SCORE_WEIGHTED = 'PrecisionScoreWeighted'¶
The arithmetic mean of precision for each class, weighted by number of true instances in each class.
- class azure.ai.ml.automl.ClassificationPrimaryMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Primary metrics for classification tasks.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- ACCURACY = 'Accuracy'¶
Accuracy is the ratio of predictions that exactly match the true class labels.
- AUC_WEIGHTED = 'AUCWeighted'¶
AUC is the Area under the curve. This metric represents arithmetic mean of the score for each class, weighted by the number of true instances in each class.
- AVERAGE_PRECISION_SCORE_WEIGHTED = 'AveragePrecisionScoreWeighted'¶
The arithmetic mean of the average precision score for each class, weighted by the number of true instances in each class.
- NORM_MACRO_RECALL = 'NormMacroRecall'¶
Normalized macro recall is recall macro-averaged and normalized, so that random performance has a score of 0, and perfect performance has a score of 1.
- PRECISION_SCORE_WEIGHTED = 'PrecisionScoreWeighted'¶
The arithmetic mean of precision for each class, weighted by number of true instances in each class.
- class azure.ai.ml.automl.ColumnTransformer(*, fields: List[str] | None = None, parameters: Dict[str, str | float] | None = None)[source]¶
Column transformer settings.
- class azure.ai.ml.automl.FeaturizationMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Featurization mode - determines data featurization mode.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- AUTO = 'Auto'¶
Auto mode, system performs featurization without any custom featurization inputs.
- CUSTOM = 'Custom'¶
Custom featurization.
- OFF = 'Off'¶
Featurization off. ‘Forecasting’ task cannot use this value.
- class azure.ai.ml.automl.ForecastHorizonMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Enum to determine forecast horizon selection mode.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- AUTO = 'Auto'¶
Forecast horizon to be determined automatically.
- CUSTOM = 'Custom'¶
Use the custom forecast horizon.
- class azure.ai.ml.automl.ForecastingJob(*, primary_metric: str | None = None, forecasting_settings: ForecastingSettings | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Forecasting Task.
- Parameters:
primary_metric (Optional[str]) – The primary metric to use for model selection.
forecasting_settings (Optional[ForecastingSettings]) – The settings for the forecasting task.
kwargs (Dict[str, Any]) – Job-specific arguments
Initialize a new AutoML Forecasting task.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- set_data(*, training_data: Input, target_column_name: str, weight_column_name: str | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, n_cross_validations: str | int | None = None, cv_split_column_names: List[str] | None = None, test_data: Input | None = None, test_data_size: float | None = None) None¶
Define data configuration.
- Keyword Arguments:
training_data (Input) – Training data.
target_column_name (str) – Column name of the target column.
weight_column_name (Optional[str]) – Weight column name, defaults to None
validation_data (Optional[Input]) – Validation data, defaults to None
validation_data_size (Optional[float]) – Validation data size, defaults to None
n_cross_validations (Optional[Union[str, int]]) – n_cross_validations, defaults to None
cv_split_column_names (Optional[List[str]]) – cv_split_column_names, defaults to None
test_data_size (Optional[float]) – Test data size, defaults to None
- set_featurization(*, blocked_transformers: List[BlockedTransformers | str] | None = None, column_name_and_types: Dict[str, str] | None = None, dataset_language: str | None = None, transformer_params: Dict[str, List[ColumnTransformer]] | None = None, mode: str | None = None, enable_dnn_featurization: bool | None = None) None¶
Define feature engineering configuration.
- Keyword Arguments:
blocked_transformers (Optional[List[Union[BlockedTransformers, str]]]) – A list of transformer names to be blocked during featurization, defaults to None
column_name_and_types (Optional[Dict[str, str]]) – A dictionary of column names and feature types used to update column purpose , defaults to None
dataset_language (Optional[str]) – Three character ISO 639-3 code for the language(s) contained in the dataset. Languages other than English are only supported if you use GPU-enabled compute. The language_code ‘mul’ should be used if the dataset contains multiple languages. To find ISO 639-3 codes for different languages, please refer to https://en.wikipedia.org/wiki/List_of_ISO_639-3_codes, defaults to None
transformer_params (Optional[Dict[str, List[ColumnTransformer]]]) – A dictionary of transformer and corresponding customization parameters , defaults to None
mode (Optional[str]) – “off”, “auto”, defaults to “auto”, defaults to None
enable_dnn_featurization (Optional[bool]) – Whether to include DNN based feature engineering methods, defaults to None
- set_forecast_settings(*, time_column_name: str | None = None, forecast_horizon: str | int | None = None, time_series_id_column_names: str | List[str] | None = None, target_lags: str | int | List[int] | None = None, feature_lags: str | None = None, target_rolling_window_size: str | int | None = None, country_or_region_for_holidays: str | None = None, use_stl: str | None = None, seasonality: str | int | None = None, short_series_handling_config: str | None = None, frequency: str | None = None, target_aggregate_function: str | None = None, cv_step_size: int | None = None, features_unknown_at_forecast_time: str | List[str] | None = None) None[source]¶
Manage parameters used by forecasting tasks.
- Keyword Arguments:
time_column_name (Optional[str]) – The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency.
forecast_horizon –
The desired maximum forecast horizon in units of time-series frequency. The default value is 1.
Units are based on the time interval of your training data, e.g., monthly, weekly that the forecaster should predict out. When task type is forecasting, this parameter is required. For more information on setting forecasting parameters, see Auto-train a time-series forecast model.
time_series_id_column_names (Optional[Union[str, List[str]]]) – The names of columns used to group a time series. It can be used to create multiple series. If time series id column names is not defined or the identifier columns specified do not identify all the series in the dataset, the time series identifiers will be automatically created for your data set.
target_lags –
The number of past periods to lag from the target column. By default the lags are turned off.
When forecasting, this parameter represents the number of rows to lag the target values based on the frequency of the data. This is represented as a list or single integer. Lag should be used when the relationship between the independent variables and dependent variable do not match up or correlate by default. For example, when trying to forecast demand for a product, the demand in any month may depend on the price of specific commodities 3 months prior. In this example, you may want to lag the target (demand) negatively by 3 months so that the model is training on the correct relationship. For more information, see Auto-train a time-series forecast model.
Note on auto detection of target lags and rolling window size. Please see the corresponding comments in the rolling window section. We use the next algorithm to detect the optimal target lag and rolling window size.
Estimate the maximum lag order for the look back feature selection. In our case it is the number of periods till the next date frequency granularity i.e. if frequency is daily, it will be a week (7), if it is a week, it will be month (4). That values multiplied by two is the largest possible values of lags/rolling windows. In our examples, we will consider the maximum lag order of 14 and 8 respectively).
Create a de-seasonalized series by adding trend and residual components. This will be used in the next step.
Estimate the PACF - Partial Auto Correlation Function on the on the data from (2) and search for points, where the auto correlation is significant i.e. its absolute value is more then 1.96/square_root(maximal lag value), which correspond to significance of 95%.
If all points are significant, we consider it being strong seasonality and do not create look back features.
We scan the PACF values from the beginning and the value before the first insignificant auto correlation will designate the lag. If first significant element (value correlate with itself) is followed by insignificant, the lag will be 0 and we will not use look back features.
feature_lags (Optional[str]) – Flag for generating lags for the numeric features with ‘auto’ or None.
target_rolling_window_size (Optional[Union[str, int]]) –
The number of past periods used to create a rolling window average of the target column.
When forecasting, this parameter represents n historical periods to use to generate forecasted values, <= training set size. If omitted, n is the full training set size. Specify this parameter when you only want to consider a certain amount of history when training the model. If set to ‘auto’, rolling window will be estimated as the last value where the PACF is more then the significance threshold. Please see target_lags section for details.
country_or_region_for_holidays (Optional[str]) – The country/region used to generate holiday features. These should be ISO 3166 two-letter country/region codes, for example ‘US’ or ‘GB’.
use_stl – Configure STL Decomposition of the time-series target column. use_stl can take three values: None (default) - no stl decomposition, ‘season’ - only generate season component and season_trend - generate both season and trend components.
seasonality (Optional[Union[int, str]) – Set time series seasonality as an integer multiple of the series frequency. If seasonality is set to ‘auto’, it will be inferred. If set to None, the time series is assumed non-seasonal which is equivalent to seasonality=1.
short_series_handling_config –
The parameter defining how if AutoML should handle short time series.
Possible values: ‘auto’ (default), ‘pad’, ‘drop’ and None.
- auto short series will be padded if there are no long series,
otherwise short series will be dropped.
pad all the short series will be padded.
drop all the short series will be dropped”.
None the short series will not be modified.
If set to ‘pad’, the table will be padded with the zeroes and empty values for the regressors and random values for target with the mean equal to target value median for given time series id. If median is more or equal to zero, the minimal padded value will be clipped by zero: Input:
Date
numeric_value
string
target
2020-01-01
23
green
55
Output assuming minimal number of values is four:
Date
numeric_value
string
target
2019-12-29
0
NA
55.1
2019-12-30
0
NA
55.6
2019-12-31
0
NA
54.5
2020-01-01
23
green
55
Note: We have two parameters short_series_handling_configuration and legacy short_series_handling. When both parameters are set we are synchronize them as shown in the table below (short_series_handling_configuration and short_series_handling for brevity are marked as handling_configuration and handling respectively).
handlinghandlingconfigurationresultinghandlingresultinghandlingconfigurationTrue
auto
True
auto
True
pad
True
auto
True
drop
True
auto
True
None
False
None
False
auto
False
None
False
pad
False
None
False
drop
False
None
False
None
False
None
frequency –
Forecast frequency.
When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. You can optionally set it to greater (but not lesser) than dataset frequency. We’ll aggregate the data and generate the results at forecast frequency. For example, for daily data, you can set the frequency to be daily, weekly or monthly, but not hourly. The frequency needs to be a pandas offset alias. Please refer to pandas documentation for more information: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects
target_aggregate_function –
The function to be used to aggregate the time series target column to conform to a user specified frequency. If the target_aggregation_function is set, but the freq parameter is not set, the error is raised. The possible target aggregation functions are: “sum”, “max”, “min” and “mean”.
The target column values are aggregated based on the specified operation. Typically, sum is appropriate for most scenarios.
Numerical predictor columns in your data are aggregated by sum, mean, minimum value, and maximum value. As a result, automated ML generates new columns suffixed with the aggregation function name and applies the selected aggregate operation.
For categorical predictor columns, the data is aggregated by mode, the most prominent category in the window.
Date predictor columns are aggregated by minimum value, maximum value and mode.
freqtarget_aggregation_functionData regularityfixing mechanismNone (Default)
None (Default)
The aggregationis not applied.If the validfrequency cannot bedeterminedthe errorwill be raised.Some Value
None (Default)
The aggregationis not applied.If the numberof data pointscompliant togiven frequencygrid isless then 90%these pointswill beremoved,otherwisethe error willbe raised.None (Default)
Aggregation function
The error aboutmissingfrequencyparameter israised.Some Value
Aggregation function
Aggregate tofrequency usingprovidedaggregationfunction.cv_step_size (Optional[int]) – Number of periods between the origin_time of one CV fold and the next fold. For example, if n_step = 3 for daily data, the origin time for each fold will be three days apart.
features_unknown_at_forecast_time (Optional[Union[str, List[str]]]) – The feature columns that are available for training but unknown at the time of forecast/inference. If features_unknown_at_forecast_time is set to an empty list, it is assumed that all the feature columns in the dataset are known at inference time. If this parameter is not set the support for future features is not enabled.
- set_limits(*, enable_early_termination: bool | None = None, exit_score: float | None = None, max_concurrent_trials: int | None = None, max_cores_per_trial: int | None = None, max_nodes: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None) None¶
Set limits for the job.
- Keyword Arguments:
enable_early_termination (Optional[bool]) –
Whether to enable early termination if the score is not improving in the short term, defaults to None.
Early stopping logic:
No early stopping for first 20 iterations (landmarks).
- Early stopping window starts on the 21st iteration and looks for early_stopping_n_iters iterations
(currently set to 10). This means that the first iteration where stopping can occur is the 31st.
AutoML still schedules 2 ensemble iterations AFTER early stopping, which might result in higher scores.
- Early stopping is triggered if the absolute value of best score calculated is the same for past
early_stopping_n_iters iterations, that is, if there is no improvement in score for early_stopping_n_iters iterations.
exit_score (Optional[float]) –
Target score for experiment. The experiment terminates after this score is reached. If not specified (no criteria), the experiment runs until no further progress is made on the primary metric. For for more information on exit criteria, see this article , defaults to None
max_concurrent_trials (Optional[int]) –
This is the maximum number of iterations that would be executed in parallel. The default value is 1.
- AmlCompute clusters support one iteration running per node. For multiple AutoML experiment parent runs
executed in parallel on a single AmlCompute cluster, the sum of the
max_concurrent_trialsvalues for all experiments should be less than or equal to the maximum number of nodes. Otherwise, runs will be queued until nodes are available.
- DSVM supports multiple iterations per node.
max_concurrent_trialsshould be less than or equal to the number of cores on the DSVM. For multiple experiments run in parallel on a single DSVM, the sum of the
max_concurrent_trialsvalues for all experiments should be less than or equal to the maximum number of nodes.
- DSVM supports multiple iterations per node.
- Databricks -
max_concurrent_trialsshould be less than or equal to the number of worker nodes on Databricks.
- Databricks -
max_concurrent_trialsdoes not apply to local runs. Formerly, this parameter was namedconcurrent_iterations.max_cores_per_trial (Optional[int]) –
The maximum number of threads to use for a given training iteration. Acceptable values:
Greater than 1 and less than or equal to the maximum number of cores on the compute target.
Equal to -1, which means to use all the possible cores per iteration per child-run.
Equal to 1, the default.
[Experimental] The maximum number of nodes to use for distributed training.
For forecasting, each model is trained using max(2, int(max_nodes / max_concurrent_trials)) nodes.
For classification/regression, each model is trained using max_nodes nodes.
Note- This parameter is in public preview and might change in future.
max_trials (Optional[int]) – The total number of different algorithm and parameter combinations to test during an automated ML experiment. If not specified, the default is 1000 iterations.
timeout_minutes (Optional[int]) – Maximum amount of time in minutes that all iterations combined can take before the experiment terminates. If not specified, the default experiment timeout is 6 days. To specify a timeout less than or equal to 1 hour, make sure your dataset’s size is not greater than 10,000,000 (rows times column) or an error results, defaults to None
trial_timeout_minutes (Optional[int]) – Maximum time in minutes that each iteration can run for before it terminates. If not specified, a value of 1 month or 43200 minutes is used, defaults to None
- set_training(*, enable_onnx_compatible_models: bool | None = None, enable_dnn_training: bool | None = None, enable_model_explainability: bool | None = None, enable_stack_ensemble: bool | None = None, enable_vote_ensemble: bool | None = None, stack_ensemble_settings: StackEnsembleSettings | None = None, ensemble_model_download_timeout: int | None = None, allowed_training_algorithms: List[str] | None = None, blocked_training_algorithms: List[str] | None = None, training_mode: str | TrainingMode | None = None) None[source]¶
The method to configure forecast training related settings.
- Keyword Arguments:
enable_onnx_compatible_models – Whether to enable or disable enforcing the ONNX-compatible models. The default is False. For more information about Open Neural Network Exchange (ONNX) and Azure Machine Learning, see this article.
enable_dnn_training (Optional[bool]) – Whether to include DNN based models during model selection. However, the default is True for DNN NLP tasks, and it’s False for all other AutoML tasks.
enable_model_explainability – Whether to enable explaining the best AutoML model at the end of all AutoML training iterations. For more information, see Interpretability: model explanations in automated machine learning. , defaults to None
enable_stack_ensemble – Whether to enable/disable StackEnsemble iteration. If enable_onnx_compatible_models flag is being set, then StackEnsemble iteration will be disabled. Similarly, for Timeseries tasks, StackEnsemble iteration will be disabled by default, to avoid risks of overfitting due to small training set used in fitting the meta learner. For more information about ensembles, see Ensemble configuration , defaults to None
enable_vote_ensemble – Whether to enable/disable VotingEnsemble iteration. For more information about ensembles, see Ensemble configuration , defaults to None
stack_ensemble_settings (Optional[StackEnsembleSettings]) – Settings for StackEnsemble iteration, defaults to None
ensemble_model_download_timeout (Optional[int]) – During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. Configure this parameter with a higher value than 300 secs, if more time is needed, defaults to None
allowed_training_algorithms (Optional[List[str]]) – A list of model names to search for an experiment. If not specified, then all models supported for the task are used minus any specified in
blocked_training_algorithmsor deprecated TensorFlow models, defaults to Noneblocked_training_algorithms (Optional[List[str]]) – A list of algorithms to ignore for an experiment, defaults to None
training_mode –
[Experimental] The training mode to use. The possible values are-
distributed- enables distributed training for supported algorithms.
non_distributed- disables distributed training.
auto- Currently, it is same as non_distributed. In future, this might change.
Note: This parameter is in public preview and may change in future.
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property featurization: TabularFeaturizationSettings | None¶
Get the tabular featurization settings for the AutoML job.
- Returns:
Tabular featurization settings for the AutoML job
- Return type:
- property forecasting_settings: ForecastingSettings | None¶
Return the forecast settings.
- Returns:
forecast settings.
- Return type:
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: TabularLimitSettings | None¶
Get the tabular limits for the AutoML job.
- Returns:
Tabular limits for the AutoML job
- Return type:
- property log_verbosity: LogVerbosity¶
Get the log verbosity for the AutoML job.
- Returns:
log verbosity for the AutoML job
- Return type:
LogVerbosity
- property primary_metric: str | None¶
Return the primary metric to use for model selection.
- Returns:
The primary metric for model selection.
- Return type:
Optional[str]
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training: ForecastingTrainingSettings¶
Return the forecast training settings.
- Returns:
training settings.
- Return type:
ForecastingTrainingSettings
- class azure.ai.ml.automl.ForecastingModels(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Enum for all forecasting models supported by AutoML.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- ARIMAX = 'Arimax'¶
An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity.
- AUTO_ARIMA = 'AutoArima'¶
Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. This model aims to explain data by using time series data on its past values and uses linear regression to make predictions.
- AVERAGE = 'Average'¶
The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data.
- DECISION_TREE = 'DecisionTree'¶
Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features.
- ELASTIC_NET = 'ElasticNet'¶
Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.
- EXPONENTIAL_SMOOTHING = 'ExponentialSmoothing'¶
Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component.
- EXTREME_RANDOM_TREES = 'ExtremeRandomTrees'¶
Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.
- GRADIENT_BOOSTING = 'GradientBoosting'¶
The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.
- KNN = 'KNN'¶
K-nearest neighbors (KNN) algorithm uses ‘feature similarity’ to predict the values of new datapoints which further means that the new data point will be assigned a value based on how closely it matches the points in the training set.
- LASSO_LARS = 'LassoLars'¶
Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.
- LIGHT_GBM = 'LightGBM'¶
LightGBM is a gradient boosting framework that uses tree based learning algorithms.
- NAIVE = 'Naive'¶
The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data.
- PROPHET = 'Prophet'¶
Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well.
- RANDOM_FOREST = 'RandomForest'¶
Random forest is a supervised learning algorithm. The “forest” it builds, is an ensemble of decision trees, usually trained with the bagging method. The general idea of the bagging method is that a combination of learning models increases the overall result.
- SEASONAL_AVERAGE = 'SeasonalAverage'¶
The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data.
- SEASONAL_NAIVE = 'SeasonalNaive'¶
The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data.
- SGD = 'SGD'¶
Stochastic gradient descent is an optimization algorithm often used in machine learning applications to find the model parameters that correspond to the best fit between predicted and actual outputs. It’s an inexact but powerful technique.
- Type:
SGD
- TCN_FORECASTER = 'TCNForecaster'¶
Temporal Convolutional Networks Forecaster is a deep neural network model capable of modeling correlations over long time periods.
- Type:
TCNForecaster
- XG_BOOST_REGRESSOR = 'XGBoostRegressor'¶
Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.
- Type:
XGBoostRegressor
- class azure.ai.ml.automl.ForecastingPrimaryMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Primary metrics for Forecasting task.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- NORMALIZED_MEAN_ABSOLUTE_ERROR = 'NormalizedMeanAbsoluteError'¶
The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.
- NORMALIZED_ROOT_MEAN_SQUARED_ERROR = 'NormalizedRootMeanSquaredError'¶
The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.
- R2_SCORE = 'R2Score'¶
The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.
- SPEARMAN_CORRELATION = 'SpearmanCorrelation'¶
The Spearman’s rank coefficient of correlation is a non-parametric measure of rank correlation.
- class azure.ai.ml.automl.ForecastingSettings(*, country_or_region_for_holidays: str | None = None, cv_step_size: int | None = None, forecast_horizon: str | int | None = None, target_lags: str | int | List[int] | None = None, target_rolling_window_size: str | int | None = None, frequency: str | None = None, feature_lags: str | None = None, seasonality: str | int | None = None, use_stl: str | None = None, short_series_handling_config: str | None = None, target_aggregate_function: str | None = None, time_column_name: str | None = None, time_series_id_column_names: str | List[str] | None = None, features_unknown_at_forecast_time: str | List[str] | None = None)[source]¶
Forecasting settings for an AutoML Job.
- Parameters:
country_or_region_for_holidays (Optional[str]) – The country/region used to generate holiday features. These should be ISO 3166 two-letter country/region code, for example ‘US’ or ‘GB’.
cv_step_size (Optional[int]) – Number of periods between the origin_time of one CV fold and the next fold. For example, if n_step = 3 for daily data, the origin time for each fold will be three days apart.
forecast_horizon (Optional[Union[int, str]]) –
The desired maximum forecast horizon in units of time-series frequency. The default value is 1.
Units are based on the time interval of your training data, e.g., monthly, weekly that the forecaster should predict out. When task type is forecasting, this parameter is required. For more information on setting forecasting parameters, see Auto-train a time-series forecast model.
target_lags (Union[str, int, List[int]]) –
The number of past periods to lag from the target column. By default the lags are turned off.
When forecasting, this parameter represents the number of rows to lag the target values based on the frequency of the data. This is represented as a list or single integer. Lag should be used when the relationship between the independent variables and dependent variable do not match up or correlate by default. For example, when trying to forecast demand for a product, the demand in any month may depend on the price of specific commodities 3 months prior. In this example, you may want to lag the target (demand) negatively by 3 months so that the model is training on the correct relationship. For more information, see Auto-train a time-series forecast model.
Note on auto detection of target lags and rolling window size. Please see the corresponding comments in the rolling window section. We use the next algorithm to detect the optimal target lag and rolling window size.
Estimate the maximum lag order for the look back feature selection. In our case it is the number of periods till the next date frequency granularity i.e. if frequency is daily, it will be a week (7), if it is a week, it will be month (4). That values multiplied by two is the largest possible values of lags/rolling windows. In our examples, we will consider the maximum lag order of 14 and 8 respectively).
Create a de-seasonalized series by adding trend and residual components. This will be used in the next step.
Estimate the PACF - Partial Auto Correlation Function on the on the data from (2) and search for points, where the auto correlation is significant i.e. its absolute value is more then 1.96/square_root(maximal lag value), which correspond to significance of 95%.
If all points are significant, we consider it being strong seasonality and do not create look back features.
We scan the PACF values from the beginning and the value before the first insignificant auto correlation will designate the lag. If first significant element (value correlate with itself) is followed by insignificant, the lag will be 0 and we will not use look back features.
target_rolling_window_size (Optional[Union[str, int]]) –
The number of past periods used to create a rolling window average of the target column.
When forecasting, this parameter represents n historical periods to use to generate forecasted values, <= training set size. If omitted, n is the full training set size. Specify this parameter when you only want to consider a certain amount of history when training the model. If set to ‘auto’, rolling window will be estimated as the last value where the PACF is more then the significance threshold. Please see target_lags section for details.
frequency (Optional[str]) –
Forecast frequency.
When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. You can optionally set it to greater (but not lesser) than dataset frequency. We’ll aggregate the data and generate the results at forecast frequency. For example, for daily data, you can set the frequency to be daily, weekly or monthly, but not hourly. The frequency needs to be a pandas offset alias. Please refer to pandas documentation for more information: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects
feature_lags (Optional[str]) – Flag for generating lags for the numeric features with ‘auto’ or None.
seasonality (Optional[Union[int, str]]) – Set time series seasonality as an integer multiple of the series frequency. If seasonality is set to ‘auto’, it will be inferred. If set to None, the time series is assumed non-seasonal which is equivalent to seasonality=1.
use_stl (Optional[str]) – Configure STL Decomposition of the time-series target column. use_stl can take three values: None (default) - no stl decomposition, ‘season’ - only generate season component and season_trend - generate both season and trend components.
short_series_handling_config (Optional[str]) –
The parameter defining how if AutoML should handle short time series.
Possible values: ‘auto’ (default), ‘pad’, ‘drop’ and None. * auto short series will be padded if there are no long series, otherwise short series will be dropped. * pad all the short series will be padded. * drop all the short series will be dropped”. * None the short series will not be modified. If set to ‘pad’, the table will be padded with the zeroes and empty values for the regressors and random values for target with the mean equal to target value median for given time series id. If median is more or equal to zero, the minimal padded value will be clipped by zero. Input:
Date
numeric_value
string
target
2020-01-01
23
green
55
Output assuming minimal number of values is four:
Date
numeric_value
string
target
2019-12-29
0
NA
55.1
2019-12-30
0
NA
55.6
2019-12-31
0
NA
54.5
2020-01-01
23
green
55
Note: We have two parameters short_series_handling_configuration and legacy short_series_handling. When both parameters are set we are synchronize them as shown in the table below (short_series_handling_configuration and short_series_handling for brevity are marked as handling_configuration and handling respectively).
handlinghandling configurationresulting handlingresulting handlingconfigurationTrue
auto
True
auto
True
pad
True
auto
True
drop
True
auto
True
None
False
None
False
auto
False
None
False
pad
False
None
False
drop
False
None
False
None
False
None
target_aggregate_function (str) –
- The function to be used to aggregate the time series target
column to conform to a user specified frequency. If the target_aggregation_function is set, but the freq parameter is not set, the error is raised. The possible target aggregation functions are: “sum”, “max”, “min” and “mean”.
The target column values are aggregated based on the specified operation. Typically, sum is appropriate for most scenarios.
Numerical predictor columns in your data are aggregated by sum, mean, minimum value, and maximum value. As a result, automated ML generates new columns suffixed with the aggregation function name and applies the selected aggregate operation.
For categorical predictor columns, the data is aggregated by mode, the most prominent category in the window.
Date predictor columns are aggregated by minimum value, maximum value and mode.
freqtarget_aggregation_functionData regularityfixing mechanismNone (Default)
None (Default)
The aggregation is notapplied. If the validfrequency can not bedetermined the error willbe raised.Some Value
None (Default)
The aggregation is notapplied. If the numberof data points compliantto given frequency gridis less then 90% these pointswill be removed, otherwisethe error will be raised.None (Default)
Aggregation function
The error about missingfrequency parameteris raised.Some Value
Aggregation function
Aggregate to frequency usingprovided aggregation function.time_column_name (Optional[str]) – The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency.
time_series_id_column_names (Union[str, List[str]]) – The names of columns used to group a timeseries. It can be used to create multiple series. If time series id column names is not defined or the identifier columns specified do not identify all the series in the dataset, the time series identifiers will be automatically created for your dataset.
features_unknown_at_forecast_time (Optional[Union[str, List[str]]]) – The feature columns that are available for training but unknown at the time of forecast/inference. If features_unknown_at_forecast_time is set to an empty list, it is assumed that all the feature columns in the dataset are known at inference time. If this parameter is not set the support for future features is not enabled.
- class azure.ai.ml.automl.ImageClassificationJob(*, primary_metric: str | ClassificationPrimaryMetrics | None = None, **kwargs: Any)[source]¶
Configuration for AutoML multi-class Image Classification job.
- Parameters:
primary_metric (Optional[str, ClassificationMultilabelPrimaryMetrics]) – The primary metric to use for optimization.
kwargs (Dict[str, Any]) – Job-specific arguments.
Example:
creating an automl image classification job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes from azure.ai.ml.automl import ClassificationMultilabelPrimaryMetrics image_classification_job = automl.ImageClassificationJob( 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=ClassificationMultilabelPrimaryMetrics.ACCURACY, tags={"my_custom_tag": "My custom value"}, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add Search space for AutoML Image Classification and Image Classification Multilabel tasks.
- Parameters:
value (Union[ImageClassificationSearchSpace, List[ImageClassificationSearchSpace]]) – specify either an instance of ImageClassificationSearchSpace or list of ImageClassificationSearchSpace for searching through the parameter space
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input | None = None, validation_data_size: float | None = None) None¶
Data settings for all AutoML Image jobs.
- Keyword Arguments:
training_data – Required. Training data.
target_column_name – Required. Target column name.
validation_data – Optional. Validation data.
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.
- Returns:
None
- set_limits(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None) None¶
Limit settings for all AutoML Image Jobs.
- Keyword Arguments:
max_concurrent_trials – Maximum number of trials to run concurrently.
max_trials – Maximum number of trials to run. Defaults to None.
timeout_minutes – AutoML job timeout.
- Returns:
None
- set_sweep(*, sampling_algorithm: str | Random | Grid | Bayesian, early_termination: BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None) None¶
Sweep settings for all AutoML Image jobs.
- Keyword Arguments:
sampling_algorithm – Required. Type of the hyperparameter sampling algorithms. Possible values include: “Grid”, “Random”, “Bayesian”.
early_termination – Type of early termination policy.
- Returns:
None
- 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¶
Setting Image training parameters for AutoML Image Classification and Image Classification Multilabel tasks.
- Keyword Arguments:
advanced_settings (str) – Settings for advanced scenarios.
ams_gradient (bool) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
checkpoint_frequency (int) – Frequency to store model checkpoints. Must be a positive integer.
checkpoint_run_id (str) – The id of a previous run that has a pretrained checkpoint for incremental training.
distributed (bool) – Whether to use distributed training.
early_stopping (bool) – Enable early stopping logic during training.
early_stopping_delay (int) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool) – Enable normalization when exporting ONNX model.
evaluation_frequency (int) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int) – 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.
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://docs.microsoft.com/en-us/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters. # pylint: disable=line-too-long
learning_rate (float) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’. Possible values include: “None”, “WarmupCosine”, “Step”.
model_name – 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.
momentum (float) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int) – Number of training epochs. Must be a positive integer.
number_of_workers (int) – Number of data loader workers. Must be a non-negative integer.
optimizer – Type of optimizer. Possible values include: “None”, “Sgd”, “Adam”, “Adamw”.
random_seed (int) – Random seed to be used when using deterministic training.
step_lr_gamma (float) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int) – Training batch size. Must be a positive integer.
validation_batch_size (int) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
training_crop_size (int) – Image crop size that is input to the neural network for the training dataset. Must be a positive integer.
validation_crop_size (int) – Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.
validation_resize_size (int) – Image size to which to resize before cropping for validation dataset. Must be a positive integer.
weighted_loss (int) – 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.
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: ImageLimitSettings¶
Returns the limit settings for all AutoML Image jobs.
- Returns:
The limit settings.
- Return type:
- property log_verbosity: LogVerbosity¶
Returns the verbosity of the logger.
- Returns:
The log verbosity.
- Return type:
LogVerbosity
- property primary_metric: str | ClassificationPrimaryMetrics | None¶
- property search_space: List[ImageClassificationSearchSpace] | None¶
List[~azure.ai.ml.automl.ImageClassificationSearchSpace] :return: Search space for AutoML Image Classification and Image Classification Multilabel tasks.
- Type:
rtype
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: ImageSweepSettings | None¶
Returns the sweep settings for all AutoML Image jobs.
- Returns:
The sweep settings.
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: ImageModelSettingsClassification | None¶
~azure.ai.ml.automl.ImageModelSettingsClassification :return: Training parameters for AutoML Image Classification and Image Classification Multilabel tasks.
- Type:
rtype
- class azure.ai.ml.automl.ImageClassificationMultilabelJob(*, primary_metric: str | ClassificationMultilabelPrimaryMetrics | None = None, **kwargs: Any)[source]¶
Configuration for AutoML multi-label Image Classification job.
- Parameters:
primary_metric (Optional[str, ClassificationMultilabelPrimaryMetrics]) – The primary metric to use for optimization.
kwargs (Dict[str, Any]) – Job-specific arguments.
Example:
creating an automl image classification multilabel job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes from azure.ai.ml.automl import ClassificationMultilabelPrimaryMetrics image_classification_multilabel_job = automl.ImageClassificationMultilabelJob( 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="terms", primary_metric=ClassificationMultilabelPrimaryMetrics.IOU, tags={"my_custom_tag": "My custom value"}, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add Search space for AutoML Image Classification and Image Classification Multilabel tasks.
- Parameters:
value (Union[ImageClassificationSearchSpace, List[ImageClassificationSearchSpace]]) – specify either an instance of ImageClassificationSearchSpace or list of ImageClassificationSearchSpace for searching through the parameter space
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input | None = None, validation_data_size: float | None = None) None¶
Data settings for all AutoML Image jobs.
- Keyword Arguments:
training_data – Required. Training data.
target_column_name – Required. Target column name.
validation_data – Optional. Validation data.
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.
- Returns:
None
- set_limits(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None) None¶
Limit settings for all AutoML Image Jobs.
- Keyword Arguments:
max_concurrent_trials – Maximum number of trials to run concurrently.
max_trials – Maximum number of trials to run. Defaults to None.
timeout_minutes – AutoML job timeout.
- Returns:
None
- set_sweep(*, sampling_algorithm: str | Random | Grid | Bayesian, early_termination: BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None) None¶
Sweep settings for all AutoML Image jobs.
- Keyword Arguments:
sampling_algorithm – Required. Type of the hyperparameter sampling algorithms. Possible values include: “Grid”, “Random”, “Bayesian”.
early_termination – Type of early termination policy.
- Returns:
None
- 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¶
Setting Image training parameters for AutoML Image Classification and Image Classification Multilabel tasks.
- Keyword Arguments:
advanced_settings (str) – Settings for advanced scenarios.
ams_gradient (bool) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
checkpoint_frequency (int) – Frequency to store model checkpoints. Must be a positive integer.
checkpoint_run_id (str) – The id of a previous run that has a pretrained checkpoint for incremental training.
distributed (bool) – Whether to use distributed training.
early_stopping (bool) – Enable early stopping logic during training.
early_stopping_delay (int) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool) – Enable normalization when exporting ONNX model.
evaluation_frequency (int) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int) – 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.
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://docs.microsoft.com/en-us/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters. # pylint: disable=line-too-long
learning_rate (float) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’. Possible values include: “None”, “WarmupCosine”, “Step”.
model_name – 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.
momentum (float) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int) – Number of training epochs. Must be a positive integer.
number_of_workers (int) – Number of data loader workers. Must be a non-negative integer.
optimizer – Type of optimizer. Possible values include: “None”, “Sgd”, “Adam”, “Adamw”.
random_seed (int) – Random seed to be used when using deterministic training.
step_lr_gamma (float) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int) – Training batch size. Must be a positive integer.
validation_batch_size (int) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
training_crop_size (int) – Image crop size that is input to the neural network for the training dataset. Must be a positive integer.
validation_crop_size (int) – Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.
validation_resize_size (int) – Image size to which to resize before cropping for validation dataset. Must be a positive integer.
weighted_loss (int) – 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.
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: ImageLimitSettings¶
Returns the limit settings for all AutoML Image jobs.
- Returns:
The limit settings.
- Return type:
- property log_verbosity: LogVerbosity¶
Returns the verbosity of the logger.
- Returns:
The log verbosity.
- Return type:
LogVerbosity
- property primary_metric: str | ClassificationMultilabelPrimaryMetrics¶
- property search_space: List[ImageClassificationSearchSpace] | None¶
List[~azure.ai.ml.automl.ImageClassificationSearchSpace] :return: Search space for AutoML Image Classification and Image Classification Multilabel tasks.
- Type:
rtype
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: ImageSweepSettings | None¶
Returns the sweep settings for all AutoML Image jobs.
- Returns:
The sweep settings.
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: ImageModelSettingsClassification | None¶
~azure.ai.ml.automl.ImageModelSettingsClassification :return: Training parameters for AutoML Image Classification and Image Classification Multilabel tasks.
- Type:
rtype
- class azure.ai.ml.automl.ImageClassificationSearchSpace(*, ams_gradient: bool | SweepDistribution | None = None, beta1: float | SweepDistribution | None = None, beta2: float | SweepDistribution | None = None, distributed: bool | SweepDistribution | None = None, early_stopping: bool | SweepDistribution | None = None, early_stopping_delay: int | SweepDistribution | None = None, early_stopping_patience: int | SweepDistribution | None = None, enable_onnx_normalization: bool | SweepDistribution | None = None, evaluation_frequency: int | SweepDistribution | None = None, gradient_accumulation_step: int | SweepDistribution | None = None, layers_to_freeze: int | SweepDistribution | None = None, learning_rate: float | SweepDistribution | None = None, learning_rate_scheduler: str | SweepDistribution | None = None, model_name: str | SweepDistribution | None = None, momentum: float | SweepDistribution | None = None, nesterov: bool | SweepDistribution | None = None, number_of_epochs: int | SweepDistribution | None = None, number_of_workers: int | SweepDistribution | None = None, optimizer: str | SweepDistribution | None = None, random_seed: int | SweepDistribution | None = None, step_lr_gamma: float | SweepDistribution | None = None, step_lr_step_size: int | SweepDistribution | None = None, training_batch_size: int | SweepDistribution | None = None, validation_batch_size: int | SweepDistribution | None = None, warmup_cosine_lr_cycles: float | SweepDistribution | None = None, warmup_cosine_lr_warmup_epochs: int | SweepDistribution | None = None, weight_decay: float | SweepDistribution | None = None, training_crop_size: int | SweepDistribution | None = None, validation_crop_size: int | SweepDistribution | None = None, validation_resize_size: int | SweepDistribution | None = None, weighted_loss: int | SweepDistribution | None = None)[source]¶
Search space for AutoML Image Classification and Image Classification Multilabel tasks.
- Parameters:
ams_gradient (bool or SweepDistribution) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float or SweepDistribution) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float or SweepDistribution) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
distributed (bool or SweepDistribution) – Whether to use distributer training.
early_stopping (bool or SweepDistribution) – Enable early stopping logic during training.
early_stopping_delay (int or SweepDistribution) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int or SweepDistribution) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool or SweepDistribution) – Enable normalization when exporting ONNX model.
evaluation_frequency (int or SweepDistribution) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int or SweepDistribution) – 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.
layers_to_freeze (int or SweepDistribution) – 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. # pylint: disable=line-too-long
learning_rate (float or SweepDistribution) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler (str or SweepDistribution) – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’.
model_name (str or SweepDistribution) – 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.
momentum (float or SweepDistribution) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool or SweepDistribution) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int or SweepDistribution) – Number of training epochs. Must be a positive integer.
number_of_workers (int or SweepDistribution) – Number of data loader workers. Must be a non-negative integer.
optimizer (str or SweepDistribution) – Type of optimizer. Must be either ‘sgd’, ‘adam’, or ‘adamw’.
random_seed (int or SweepDistribution) – Random seed to be used when using deterministic training.
step_lr_gamma (float or SweepDistribution) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int or SweepDistribution) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int or SweepDistribution) – Training batch size. Must be a positive integer.
validation_batch_size (int or SweepDistribution) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float or SweepDistribution) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int or SweepDistribution) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float or SweepDistribution) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
training_crop_size (int or SweepDistribution) – Image crop size that is input to the neural network for the training dataset. Must be a positive integer.
validation_crop_size (int or SweepDistribution) – Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.
validation_resize_size (int or SweepDistribution) – Image size to which to resize before cropping for validation dataset. Must be a positive integer.
weighted_loss (int or SweepDistribution) – 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.
Example:
Defining an automl image classification search space¶from azure.ai.ml import automl from azure.ai.ml.sweep import Uniform, Choice image_classification_search_space = automl.ImageClassificationSearchSpace( model_name="vitb16r224", number_of_epochs=Choice([15, 30]), weight_decay=Uniform(0.01, 0.1), )
- class azure.ai.ml.automl.ImageInstanceSegmentationJob(*, primary_metric: str | InstanceSegmentationPrimaryMetrics | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Image Instance Segmentation job.
- Keyword Arguments:
primary_metric (Optional[str, InstanceSegmentationPrimaryMetrics]) – The primary metric to use for optimization.
kwargs (Dict[str, Any]) – Job-specific arguments.
Example:
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, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add search space for AutoML Image Object Detection and Image Instance Segmentation tasks.
- Parameters:
value (Union[SearchSpace, List[SearchSpace]]) – Search through the parameter space
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input | None = None, validation_data_size: float | None = None) None¶
Data settings for all AutoML Image jobs.
- Keyword Arguments:
training_data – Required. Training data.
target_column_name – Required. Target column name.
validation_data – Optional. Validation data.
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.
- Returns:
None
- set_limits(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None) None¶
Limit settings for all AutoML Image Jobs.
- Keyword Arguments:
max_concurrent_trials – Maximum number of trials to run concurrently.
max_trials – Maximum number of trials to run. Defaults to None.
timeout_minutes – AutoML job timeout.
- Returns:
None
- set_sweep(*, sampling_algorithm: str | Random | Grid | Bayesian, early_termination: BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None) None¶
Sweep settings for all AutoML Image jobs.
- Keyword Arguments:
sampling_algorithm – Required. Type of the hyperparameter sampling algorithms. Possible values include: “Grid”, “Random”, “Bayesian”.
early_termination – Type of early termination policy.
- Returns:
None
- 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) None¶
Setting Image training parameters for for AutoML Image Object Detection and Image Instance Segmentation tasks.
- Keyword Arguments:
advanced_settings (str) – Settings for advanced scenarios.
ams_gradient (bool) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
checkpoint_frequency (int) – Frequency to store model checkpoints. Must be a positive integer.
checkpoint_run_id (str) – The id of a previous run that has a pretrained checkpoint for incremental training.
distributed (bool) – Whether to use distributed training.
early_stopping (bool) – Enable early stopping logic during training.
early_stopping_delay (int) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool) – Enable normalization when exporting ONNX model.
evaluation_frequency (int) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int) – 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.
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://docs.microsoft.com/en-us/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters. # pylint: disable=line-too-long
learning_rate (float) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’. Possible values include: “None”, “WarmupCosine”, “Step”.
model_name – 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.
momentum (float) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int) – Number of training epochs. Must be a positive integer.
number_of_workers (int) – Number of data loader workers. Must be a non-negative integer.
optimizer – Type of optimizer. Possible values include: “None”, “Sgd”, “Adam”, “Adamw”.
random_seed (int) – Random seed to be used when using deterministic training.
step_lr_gamma (float) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int) – Training batch size. Must be a positive integer.
validation_batch_size (int) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
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.
box_score_threshold (float) – During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1].
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.
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.
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.
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.
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.
nms_iou_threshold (float) – IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].
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.
tile_overlap_ratio (float) – Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1).
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.
validation_iou_threshold (float) – IOU threshold to use when computing validation metric. Must be float in the range [0, 1].
validation_metric_type (str or ValidationMetricType) – Metric computation method to use for validation metrics. Must be ‘none’, ‘coco’, ‘voc’, or ‘coco_voc’.
log_training_metrics (str or LogTrainingMetrics) – indicates whether or not to log training metrics. Must be ‘Enable’ or ‘Disable’
log_validation_loss (str or LogValidationLoss) – indicates whether or not to log validation loss. Must be ‘Enable’ or ‘Disable’
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: ImageLimitSettings¶
Returns the limit settings for all AutoML Image jobs.
- Returns:
The limit settings.
- Return type:
- property log_verbosity: LogVerbosity¶
Returns the verbosity of the logger.
- Returns:
The log verbosity.
- Return type:
LogVerbosity
- property primary_metric: str | InstanceSegmentationPrimaryMetrics¶
- property search_space: List[ImageObjectDetectionSearchSpace] | None¶
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: ImageSweepSettings | None¶
Returns the sweep settings for all AutoML Image jobs.
- Returns:
The sweep settings.
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: ImageModelSettingsObjectDetection | None¶
- class azure.ai.ml.automl.ImageLimitSettings(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None)[source]¶
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.
- Keyword Arguments:
- Raises:
ValueError – If max_concurrent_trials is not None and is not a positive integer.
ValueError – If max_trials is not None and is not a positive integer.
ValueError – If timeout_minutes is not None and is not a positive integer.
- Returns:
ImageLimitSettings object.
- Return type:
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.
Example:
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, )
- class azure.ai.ml.automl.ImageModelSettingsClassification(*, 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: 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: 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, **kwargs: Any)[source]¶
Model settings for AutoML Image Classification tasks.
- Parameters:
advanced_settings (str) – Settings for advanced scenarios.
ams_gradient (bool) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
checkpoint_frequency (int) – Frequency to store model checkpoints. Must be a positive integer.
checkpoint_run_id (str) – The id of a previous run that has a pretrained checkpoint for incremental training.
distributed (bool) – Whether to use distributed training.
early_stopping (bool) – Enable early stopping logic during training.
early_stopping_delay (int) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool) – Enable normalization when exporting ONNX model.
evaluation_frequency (int) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int) – 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.
layers_to_freeze (int) – 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/how-to-auto-train-image-models.
learning_rate (float) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler (str or LearningRateScheduler) – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’. Possible values include: “None”, “WarmupCosine”, “Step”.
model_name (str) – 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.
momentum (float) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int) – Number of training epochs. Must be a positive integer.
number_of_workers (int) – Number of data loader workers. Must be a non-negative integer.
optimizer (str or StochasticOptimizer) – Type of optimizer. Possible values include: “None”, “Sgd”, “Adam”, “Adamw”.
random_seed (int) – Random seed to be used when using deterministic training.
step_lr_gamma (float) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int) – Training batch size. Must be a positive integer.
validation_batch_size (int) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
training_crop_size (int) – Image crop size that is input to the neural network for the training dataset. Must be a positive integer.
validation_crop_size (int) – Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.
validation_resize_size (int) – Image size to which to resize before cropping for validation dataset. Must be a positive integer.
weighted_loss (int) – 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.
Example:
Defining the automl image classification model settings.¶from azure.ai.ml import automl image_classification_model_settings = automl.ImageModelSettingsClassification( checkpoint_frequency=5, early_stopping=False, gradient_accumulation_step=2, )
- class azure.ai.ml.automl.ImageModelSettingsObjectDetection(*, 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: 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: 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: 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: ValidationMetricType | None = None, log_training_metrics: LogTrainingMetrics | None = None, log_validation_loss: LogValidationLoss | None = None, **kwargs: Any)[source]¶
Model settings for AutoML Image Object Detection Task.
- Parameters:
advanced_settings (str) – Settings for advanced scenarios.
ams_gradient (bool) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
checkpoint_frequency (int) – Frequency to store model checkpoints. Must be a positive integer.
checkpoint_run_id (str) – The id of a previous run that has a pretrained checkpoint for incremental training.
distributed (bool) – Whether to use distributed training.
early_stopping (bool) – Enable early stopping logic during training.
early_stopping_delay (int) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool) – Enable normalization when exporting ONNX model.
evaluation_frequency (int) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int) – 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.
layers_to_freeze (int) – 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/how-to-auto-train-image-models.
learning_rate (float) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler (str or LearningRateScheduler) – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’. Possible values include: “None”, “WarmupCosine”, “Step”.
model_name (str) – 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.
momentum (float) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int) – Number of training epochs. Must be a positive integer.
number_of_workers (int) – Number of data loader workers. Must be a non-negative integer.
optimizer (str or StochasticOptimizer) – Type of optimizer. Possible values include: “None”, “Sgd”, “Adam”, “Adamw”.
random_seed (int) – Random seed to be used when using deterministic training.
step_lr_gamma (float) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int) – Training batch size. Must be a positive integer.
validation_batch_size (int) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
box_detections_per_image (int) – Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the ‘yolov5’ algorithm.
box_score_threshold (float) – During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1].
image_size (int) – Image size for train 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.
max_size (int) – 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.
min_size (int) – 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.
model_size (str or ModelSize) – Model size. Must be ‘small’, ‘medium’, ‘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. Possible values include: “None”, “Small”, “Medium”, “Large”, “ExtraLarge”.
multi_scale (bool) – 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.
nms_iou_threshold (float) – IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1].
tile_grid_size (str) – 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. Note: This settings is not supported for the ‘yolov5’ algorithm.
tile_overlap_ratio (float) – Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Note: This settings is not supported for the ‘yolov5’ algorithm.
tile_predictions_nms_threshold (float) – 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]. Note: This settings is not supported for the ‘yolov5’ algorithm.
validation_iou_threshold (float) – IOU threshold to use when computing validation metric. Must be float in the range [0, 1].
validation_metric_type (str or ValidationMetricType) – Metric computation method to use for validation metrics. Possible values include: “None”, “Coco”, “Voc”, “CocoVoc”.
log_training_metrics (str or LogTrainingMetrics) – indicates whether or not to log training metrics
log_validation_loss (str or LogValidationLoss) – indicates whether or not to log validation loss
Defining the automl image object detection or instance segmentation model settings.¶from azure.ai.ml import automl object_detection_model_settings = automl.ImageModelSettingsObjectDetection(min_size=600, max_size=1333)
- class azure.ai.ml.automl.ImageObjectDetectionJob(*, primary_metric: str | ObjectDetectionPrimaryMetrics | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Image Object Detection job.
- Keyword Arguments:
primary_metric (Optional[str, ObjectDetectionPrimaryMetrics]) – The primary metric to use for optimization.
Example:
creating an automl image object detection job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes from azure.ai.ml.automl import ObjectDetectionPrimaryMetrics image_object_detection_job = automl.ImageObjectDetectionJob( 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, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add search space for AutoML Image Object Detection and Image Instance Segmentation tasks.
- Parameters:
value (Union[SearchSpace, List[SearchSpace]]) – Search through the parameter space
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input | None = None, validation_data_size: float | None = None) None¶
Data settings for all AutoML Image jobs.
- Keyword Arguments:
training_data – Required. Training data.
target_column_name – Required. Target column name.
validation_data – Optional. Validation data.
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.
- Returns:
None
- set_limits(*, max_concurrent_trials: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None) None¶
Limit settings for all AutoML Image Jobs.
- Keyword Arguments:
max_concurrent_trials – Maximum number of trials to run concurrently.
max_trials – Maximum number of trials to run. Defaults to None.
timeout_minutes – AutoML job timeout.
- Returns:
None
- set_sweep(*, sampling_algorithm: str | Random | Grid | Bayesian, early_termination: BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None) None¶
Sweep settings for all AutoML Image jobs.
- Keyword Arguments:
sampling_algorithm – Required. Type of the hyperparameter sampling algorithms. Possible values include: “Grid”, “Random”, “Bayesian”.
early_termination – Type of early termination policy.
- Returns:
None
- 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) None¶
Setting Image training parameters for for AutoML Image Object Detection and Image Instance Segmentation tasks.
- Keyword Arguments:
advanced_settings (str) – Settings for advanced scenarios.
ams_gradient (bool) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
checkpoint_frequency (int) – Frequency to store model checkpoints. Must be a positive integer.
checkpoint_run_id (str) – The id of a previous run that has a pretrained checkpoint for incremental training.
distributed (bool) – Whether to use distributed training.
early_stopping (bool) – Enable early stopping logic during training.
early_stopping_delay (int) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool) – Enable normalization when exporting ONNX model.
evaluation_frequency (int) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int) – 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.
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://docs.microsoft.com/en-us/azure/machine-learning/reference-automl-images-hyperparameters#model-agnostic-hyperparameters. # pylint: disable=line-too-long
learning_rate (float) – Initial learning rate. Must be a float in the range [0, 1].
learning_rate_scheduler – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’. Possible values include: “None”, “WarmupCosine”, “Step”.
model_name – 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.
momentum (float) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int) – Number of training epochs. Must be a positive integer.
number_of_workers (int) – Number of data loader workers. Must be a non-negative integer.
optimizer – Type of optimizer. Possible values include: “None”, “Sgd”, “Adam”, “Adamw”.
random_seed (int) – Random seed to be used when using deterministic training.
step_lr_gamma (float) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int) – Training batch size. Must be a positive integer.
validation_batch_size (int) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (float) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
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.
box_score_threshold (float) – During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1].
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.
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.
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.
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.
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.
nms_iou_threshold (float) – IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].
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.
tile_overlap_ratio (float) – Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1).
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.
validation_iou_threshold (float) – IOU threshold to use when computing validation metric. Must be float in the range [0, 1].
validation_metric_type (str or ValidationMetricType) – Metric computation method to use for validation metrics. Must be ‘none’, ‘coco’, ‘voc’, or ‘coco_voc’.
log_training_metrics (str or LogTrainingMetrics) – indicates whether or not to log training metrics. Must be ‘Enable’ or ‘Disable’
log_validation_loss (str or LogValidationLoss) – indicates whether or not to log validation loss. Must be ‘Enable’ or ‘Disable’
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: ImageLimitSettings¶
Returns the limit settings for all AutoML Image jobs.
- Returns:
The limit settings.
- Return type:
- property log_verbosity: LogVerbosity¶
Returns the verbosity of the logger.
- Returns:
The log verbosity.
- Return type:
LogVerbosity
- property primary_metric: str | ObjectDetectionPrimaryMetrics¶
- property search_space: List[ImageObjectDetectionSearchSpace] | None¶
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: ImageSweepSettings | None¶
Returns the sweep settings for all AutoML Image jobs.
- Returns:
The sweep settings.
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: ImageModelSettingsObjectDetection | None¶
- class azure.ai.ml.automl.ImageObjectDetectionSearchSpace(*, ams_gradient: bool | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, beta1: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, beta2: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, distributed: bool | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, early_stopping: bool | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, early_stopping_delay: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, early_stopping_patience: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, enable_onnx_normalization: bool | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, evaluation_frequency: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, gradient_accumulation_step: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, layers_to_freeze: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, learning_rate: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, learning_rate_scheduler: str | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, model_name: str | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, momentum: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, nesterov: bool | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, number_of_epochs: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, number_of_workers: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, optimizer: str | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, random_seed: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, step_lr_gamma: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, step_lr_step_size: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, training_batch_size: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, validation_batch_size: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, warmup_cosine_lr_cycles: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, warmup_cosine_lr_warmup_epochs: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, weight_decay: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, box_detections_per_image: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, box_score_threshold: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, image_size: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, max_size: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, min_size: int | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, model_size: str | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, multi_scale: bool | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, nms_iou_threshold: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, tile_grid_size: str | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, tile_overlap_ratio: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, tile_predictions_nms_threshold: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, validation_iou_threshold: float | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None, validation_metric_type: str | Choice | LogNormal | LogUniform | Normal | QLogNormal | QLogUniform | QNormal | QUniform | Randint | Uniform | None = None)[source]¶
Search space for AutoML Image Object Detection and Image Instance Segmentation tasks.
- Parameters:
ams_gradient (bool or SweepDistribution) – Enable AMSGrad when optimizer is ‘adam’ or ‘adamw’.
beta1 (float or SweepDistribution) – Value of ‘beta1’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
beta2 (float or SweepDistribution) – Value of ‘beta2’ when optimizer is ‘adam’ or ‘adamw’. Must be a float in the range [0, 1].
distributed (bool or SweepDistribution) – Whether to use distributer training.
early_stopping (bool or SweepDistribution) – Enable early stopping logic during training.
early_stopping_delay (int or SweepDistribution) – Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer.
early_stopping_patience (int or SweepDistribution) – Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer.
enable_onnx_normalization (bool or SweepDistribution) – Enable normalization when exporting ONNX model.
evaluation_frequency (int or SweepDistribution) – Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.
gradient_accumulation_step (int or SweepDistribution) – 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.
layers_to_freeze (int or SweepDistribution) – 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. # pylint: disable=line-too-long
learning_rate – Initial learning rate. Must be a float in the range [0, 1]. :type learning_rate: float or ~azure.ai.ml.entities.SweepDistribution
learning_rate_scheduler (str or SweepDistribution) – Type of learning rate scheduler. Must be ‘warmup_cosine’ or ‘step’.
model_name (str or SweepDistribution) – 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.
momentum (float or SweepDistribution) – Value of momentum when optimizer is ‘sgd’. Must be a float in the range [0, 1].
nesterov (bool or SweepDistribution) – Enable nesterov when optimizer is ‘sgd’.
number_of_epochs (int or SweepDistribution) – Number of training epochs. Must be a positive integer.
number_of_workers (int or SweepDistribution) – Number of data loader workers. Must be a non-negative integer.
optimizer (str or SweepDistribution) – Type of optimizer. Must be either ‘sgd’, ‘adam’, or ‘adamw’.
random_seed (int or SweepDistribution) – Random seed to be used when using deterministic training.
step_lr_gamma (float or SweepDistribution) – Value of gamma when learning rate scheduler is ‘step’. Must be a float in the range [0, 1].
step_lr_step_size (int or SweepDistribution) – Value of step size when learning rate scheduler is ‘step’. Must be a positive integer.
training_batch_size (int or SweepDistribution) – Training batch size. Must be a positive integer.
validation_batch_size (int or SweepDistribution) – Validation batch size. Must be a positive integer.
warmup_cosine_lr_cycles (float or SweepDistribution) – Value of cosine cycle when learning rate scheduler is ‘warmup_cosine’. Must be a float in the range [0, 1].
warmup_cosine_lr_warmup_epochs (int or SweepDistribution) – Value of warmup epochs when learning rate scheduler is ‘warmup_cosine’. Must be a positive integer.
weight_decay (int or SweepDistribution) – Value of weight decay when optimizer is ‘sgd’, ‘adam’, or ‘adamw’. Must be a float in the range[0, 1].
box_detections_per_image (int or SweepDistribution) – Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the ‘yolov5’ algorithm.
box_score_threshold (float or SweepDistribution) – During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1].
image_size (int or SweepDistribution) – Image size for train 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.
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. :type max_size: int or ~azure.ai.ml.entities.SweepDistribution
min_size (int or SweepDistribution) – 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.
model_size (str or SweepDistribution) – 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.
multi_scale (bool or SweepDistribution) – 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.
nms_iou_threshold (float or SweepDistribution) – IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].
tile_grid_size (str or SweepDistribution) – 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.
tile_overlap_ratio (float or SweepDistribution) – Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1).
tile_predictions_nms_threshold (float or SweepDistribution) – 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.
validation_iou_threshold (float or SweepDistribution) – IOU threshold to use when computing validation metric. Must be float in the range [0, 1].
validation_metric_type (str or SweepDistribution) – Metric computation method to use for validation metrics. Must be ‘none’, ‘coco’, ‘voc’, or ‘coco_voc’.
Example:
Defining an automl image object detection or instance segmentation search space¶from azure.ai.ml import automl from azure.ai.ml.sweep import Uniform image_detection_search_space = automl.ImageObjectDetectionSearchSpace( learning_rate=Uniform(0.005, 0.05), model_name="yolov5", weight_decay=Uniform(0.01, 0.1), )
- class azure.ai.ml.automl.ImageSweepSettings(*, sampling_algorithm: str | Grid | Bayesian | Random, early_termination: EarlyTerminationPolicy | BanditPolicy | MedianStoppingPolicy | TruncationSelectionPolicy | None = None)[source]¶
Sweep settings for all AutoML Image Verticals.
- Keyword Arguments:
sampling_algorithm (Union[ str, GRID, BAYESIAN, RANDOM) – Required. Type of the hyperparameter sampling. algorithms. Possible values include: “Grid”, “Random”, “Bayesian”.
] :keyword early_termination: Type of early termination policy. :paramtype early_termination: Union[
~azure.mgmt.machinelearningservices.models.BanditPolicy, ~azure.mgmt.machinelearningservices.models.MedianStoppingPolicy, ~azure.mgmt.machinelearningservices.models.TruncationSelectionPolicy
]
Example:
Defining the sweep settings for an automl image job.¶from azure.ai.ml import automl from azure.ai.ml.sweep import BanditPolicy image_sweep_settings = automl.ImageSweepSettings( sampling_algorithm="Grid", early_termination=BanditPolicy(evaluation_interval=2, slack_factor=0.05, delay_evaluation=6), )
- class azure.ai.ml.automl.InstanceSegmentationPrimaryMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Primary metrics for InstanceSegmentation tasks.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- MEAN_AVERAGE_PRECISION = 'MeanAveragePrecision'¶
Mean Average Precision (MAP) is the average of AP (Average Precision). AP is calculated for each class and averaged to get the MAP.
- class azure.ai.ml.automl.LearningRateScheduler(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Learning rate scheduler enum.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- NONE = 'None'¶
No learning rate scheduler selected.
- STEP = 'Step'¶
Step learning rate scheduler.
- WARMUP_COSINE = 'WarmupCosine'¶
Cosine Annealing With Warmup.
- class azure.ai.ml.automl.LogTrainingMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- DISABLE = 'Disable'¶
Disable compute and log training metrics.
- ENABLE = 'Enable'¶
Enable compute and log training metrics.
- class azure.ai.ml.automl.LogValidationLoss(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- DISABLE = 'Disable'¶
Disable compute and log validation metrics.
- ENABLE = 'Enable'¶
Enable compute and log validation metrics.
- class azure.ai.ml.automl.NCrossValidationsMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Determines how N-Cross validations value is determined.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- AUTO = 'Auto'¶
Determine N-Cross validations value automatically. Supported only for ‘Forecasting’ AutoML task.
- CUSTOM = 'Custom'¶
Use custom N-Cross validations value.
- class azure.ai.ml.automl.NlpFeaturizationSettings(*, dataset_language: str | None = None)[source]¶
Featurization settings for all AutoML NLP Verticals.
- Variables:
type (str) – Specifies the type of FeaturizationSettings. Set automatically to “NLP” for this class.
Example:
creating an nlp featurization settings¶from azure.ai.ml import automl nlp_featurization_settings = automl.NlpFeaturizationSettings(dataset_language="eng")
- type = 'nlp'¶
- class azure.ai.ml.automl.NlpFixedParameters(*, gradient_accumulation_steps: int | None = None, learning_rate: float | None = None, learning_rate_scheduler: str | None = None, model_name: str | None = None, number_of_epochs: int | None = None, training_batch_size: int | None = None, validation_batch_size: int | None = None, warmup_ratio: float | None = None, weight_decay: float | None = None)[source]¶
Configuration of fixed parameters for all candidates of an AutoML NLP Job
- Parameters:
gradient_accumulation_steps (Optional[int]) – number of steps over which to accumulate gradients before a backward pass. This must be a positive integer, defaults to None
learning_rate (Optional[float]) – initial learning rate. Must be a float in (0, 1), defaults to None
learning_rate_scheduler (Optional[str]) – the type of learning rate scheduler. Must choose from ‘linear’, ‘cosine’, ‘cosine_with_restarts’, ‘polynomial’, ‘constant’, and ‘constant_with_warmup’, defaults to None
model_name (Optional[str]) – the model name to use during training. Must choose from ‘bert-base-cased’, ‘bert-base-uncased’, ‘bert-base-multilingual-cased’, ‘bert-base-german-cased’, ‘bert-large-cased’, ‘bert-large-uncased’, ‘distilbert-base-cased’, ‘distilbert-base-uncased’, ‘roberta-base’, ‘roberta-large’, ‘distilroberta-base’, ‘xlm-roberta-base’, ‘xlm-roberta-large’, xlnet-base-cased’, and ‘xlnet-large-cased’, defaults to None
number_of_epochs (Optional[int]) – the number of epochs to train with. Must be a positive integer, defaults to None
training_batch_size (Optional[int]) – the batch size during training. Must be a positive integer, defaults to None
validation_batch_size (Optional[int]) – the batch size during validation. Must be a positive integer, defaults to None
warmup_ratio (Optional[float]) – ratio of total training steps used for a linear warmup from 0 to learning_rate. Must be a float in [0, 1], defaults to None
weight_decay (Optional[float]) – value of weight decay when optimizer is sgd, adam, or adamw. This must be a float in the range [0, 1] defaults to None
Example:
creating an nlp fixed parameters¶from azure.ai.ml import automl from azure.ai.ml.constants import NlpLearningRateScheduler nlp_fixed_parameters = automl.NlpFixedParameters( model_name="roberta-base", learning_rate_scheduler=NlpLearningRateScheduler.LINEAR, warmup_ratio=0.1, )
- class azure.ai.ml.automl.NlpLimitSettings(*, max_concurrent_trials: int | None = None, max_trials: int = 1, max_nodes: int = 1, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None)[source]¶
Limit settings for all AutoML NLP Verticals.
- Parameters:
Example:
creating an nlp limit settings¶from azure.ai.ml import automl nlp_limit_settings = automl.NlpLimitSettings( max_concurrent_trials=2, max_trials=4, max_nodes=4, timeout_minutes=120 )
- class azure.ai.ml.automl.NlpSearchSpace(*, gradient_accumulation_steps: int | SweepDistribution | None = None, learning_rate: float | SweepDistribution | None = None, learning_rate_scheduler: str | SweepDistribution | None = None, model_name: str | SweepDistribution | None = None, number_of_epochs: int | SweepDistribution | None = None, training_batch_size: int | SweepDistribution | None = None, validation_batch_size: int | SweepDistribution | None = None, warmup_ratio: float | SweepDistribution | None = None, weight_decay: float | SweepDistribution | None = None)[source]¶
Search space for AutoML NLP tasks.
- Parameters:
gradient_accumulation_steps (Optional[Union[int, SweepDistribution]]) – number of steps over which to accumulate gradients before a backward pass. This must be a positive integer., defaults to None
learning_rate (Optional[Union[float, SweepDistribution]]) – initial learning rate. Must be a float in (0, 1), defaults to None
learning_rate_scheduler (Optional[Union[str, SweepDistribution]]) – the type of learning rate scheduler. Must choose from ‘linear’, ‘cosine’, ‘cosine_with_restarts’, ‘polynomial’, ‘constant’, and ‘constant_with_warmup’, defaults to None
model_name (Optional[Union[str, SweepDistribution]]) – the model name to use during training. Must choose from ‘bert-base-cased’, ‘bert-base-uncased’, ‘bert-base-multilingual-cased’, ‘bert-base-german-cased’, ‘bert-large-cased’, ‘bert-large-uncased’, ‘distilbert-base-cased’, ‘distilbert-base-uncased’, ‘roberta-base’, ‘roberta-large’, ‘distilroberta-base’, ‘xlm-roberta-base’, ‘xlm-roberta-large’, xlnet-base-cased’, and ‘xlnet-large-cased’, defaults to None
number_of_epochs (Optional[Union[int, SweepDistribution]]) – the number of epochs to train with. Must be a positive integer, defaults to None
training_batch_size (Optional[Union[int, SweepDistribution]]) – the batch size during training. Must be a positive integer, defaults to None
validation_batch_size (Optional[Union[int, SweepDistribution]]) – the batch size during validation. Must be a positive integer, defaults to None
warmup_ratio (Optional[Union[float, SweepDistribution]]) – ratio of total training steps used for a linear warmup from 0 to learning_rate. Must be a float in [0, 1], defaults to None
weight_decay (Optional[Union[float, SweepDistribution]]) – value of weight decay when optimizer is sgd, adam, or adamw. This must be a float in the range [0, 1], defaults to None
Example:
creating an nlp search space¶from azure.ai.ml import automl from azure.ai.ml.constants import NlpLearningRateScheduler from azure.ai.ml.sweep import Uniform nlp_search_space = automl.NlpSearchSpace( learning_rate_scheduler=NlpLearningRateScheduler.LINEAR, warmup_ratio=0.1, model_name="roberta-base", weight_decay=Uniform(0.01, 0.1), )
- class azure.ai.ml.automl.NlpSweepSettings(*, sampling_algorithm: str | SamplingAlgorithmType, early_termination: EarlyTerminationPolicy | None = None)[source]¶
Sweep settings for all AutoML NLP tasks.
- Parameters:
sampling_algorithm (Union[str, SamplingAlgorithmType]) – Required. Specifies type of hyperparameter sampling algorithm. Possible values include: “Grid”, “Random”, and “Bayesian”.
early_termination (Optional[EarlyTerminationPolicy]) – Early termination policy to end poorly performing training candidates, defaults to None.
Example:
creating an nlp sweep settings¶from azure.ai.ml import automl from azure.ai.ml.sweep import BanditPolicy nlp_sweep_settings = automl.NlpSweepSettings( sampling_algorithm="Grid", early_termination=BanditPolicy(evaluation_interval=2, slack_factor=0.05, delay_evaluation=6), )
- class azure.ai.ml.automl.ObjectDetectionPrimaryMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Primary metrics for Image ObjectDetection task.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- MEAN_AVERAGE_PRECISION = 'MeanAveragePrecision'¶
Mean Average Precision (MAP) is the average of AP (Average Precision). AP is calculated for each class and averaged to get the MAP.
- class azure.ai.ml.automl.RegressionJob(*, primary_metric: str | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Regression Job.
Initialize a new AutoML Regression task.
- Parameters:
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- set_data(*, training_data: Input, target_column_name: str, weight_column_name: str | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, n_cross_validations: str | int | None = None, cv_split_column_names: List[str] | None = None, test_data: Input | None = None, test_data_size: float | None = None) None¶
Define data configuration.
- Keyword Arguments:
training_data (Input) – Training data.
target_column_name (str) – Column name of the target column.
weight_column_name (Optional[str]) – Weight column name, defaults to None
validation_data (Optional[Input]) – Validation data, defaults to None
validation_data_size (Optional[float]) – Validation data size, defaults to None
n_cross_validations (Optional[Union[str, int]]) – n_cross_validations, defaults to None
cv_split_column_names (Optional[List[str]]) – cv_split_column_names, defaults to None
test_data_size (Optional[float]) – Test data size, defaults to None
- set_featurization(*, blocked_transformers: List[BlockedTransformers | str] | None = None, column_name_and_types: Dict[str, str] | None = None, dataset_language: str | None = None, transformer_params: Dict[str, List[ColumnTransformer]] | None = None, mode: str | None = None, enable_dnn_featurization: bool | None = None) None¶
Define feature engineering configuration.
- Keyword Arguments:
blocked_transformers (Optional[List[Union[BlockedTransformers, str]]]) – A list of transformer names to be blocked during featurization, defaults to None
column_name_and_types (Optional[Dict[str, str]]) – A dictionary of column names and feature types used to update column purpose , defaults to None
dataset_language (Optional[str]) – Three character ISO 639-3 code for the language(s) contained in the dataset. Languages other than English are only supported if you use GPU-enabled compute. The language_code ‘mul’ should be used if the dataset contains multiple languages. To find ISO 639-3 codes for different languages, please refer to https://en.wikipedia.org/wiki/List_of_ISO_639-3_codes, defaults to None
transformer_params (Optional[Dict[str, List[ColumnTransformer]]]) – A dictionary of transformer and corresponding customization parameters , defaults to None
mode (Optional[str]) – “off”, “auto”, defaults to “auto”, defaults to None
enable_dnn_featurization (Optional[bool]) – Whether to include DNN based feature engineering methods, defaults to None
- set_limits(*, enable_early_termination: bool | None = None, exit_score: float | None = None, max_concurrent_trials: int | None = None, max_cores_per_trial: int | None = None, max_nodes: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None) None¶
Set limits for the job.
- Keyword Arguments:
enable_early_termination (Optional[bool]) –
Whether to enable early termination if the score is not improving in the short term, defaults to None.
Early stopping logic:
No early stopping for first 20 iterations (landmarks).
- Early stopping window starts on the 21st iteration and looks for early_stopping_n_iters iterations
(currently set to 10). This means that the first iteration where stopping can occur is the 31st.
AutoML still schedules 2 ensemble iterations AFTER early stopping, which might result in higher scores.
- Early stopping is triggered if the absolute value of best score calculated is the same for past
early_stopping_n_iters iterations, that is, if there is no improvement in score for early_stopping_n_iters iterations.
exit_score (Optional[float]) –
Target score for experiment. The experiment terminates after this score is reached. If not specified (no criteria), the experiment runs until no further progress is made on the primary metric. For for more information on exit criteria, see this article , defaults to None
max_concurrent_trials (Optional[int]) –
This is the maximum number of iterations that would be executed in parallel. The default value is 1.
- AmlCompute clusters support one iteration running per node. For multiple AutoML experiment parent runs
executed in parallel on a single AmlCompute cluster, the sum of the
max_concurrent_trialsvalues for all experiments should be less than or equal to the maximum number of nodes. Otherwise, runs will be queued until nodes are available.
- DSVM supports multiple iterations per node.
max_concurrent_trialsshould be less than or equal to the number of cores on the DSVM. For multiple experiments run in parallel on a single DSVM, the sum of the
max_concurrent_trialsvalues for all experiments should be less than or equal to the maximum number of nodes.
- DSVM supports multiple iterations per node.
- Databricks -
max_concurrent_trialsshould be less than or equal to the number of worker nodes on Databricks.
- Databricks -
max_concurrent_trialsdoes not apply to local runs. Formerly, this parameter was namedconcurrent_iterations.max_cores_per_trial (Optional[int]) –
The maximum number of threads to use for a given training iteration. Acceptable values:
Greater than 1 and less than or equal to the maximum number of cores on the compute target.
Equal to -1, which means to use all the possible cores per iteration per child-run.
Equal to 1, the default.
[Experimental] The maximum number of nodes to use for distributed training.
For forecasting, each model is trained using max(2, int(max_nodes / max_concurrent_trials)) nodes.
For classification/regression, each model is trained using max_nodes nodes.
Note- This parameter is in public preview and might change in future.
max_trials (Optional[int]) – The total number of different algorithm and parameter combinations to test during an automated ML experiment. If not specified, the default is 1000 iterations.
timeout_minutes (Optional[int]) – Maximum amount of time in minutes that all iterations combined can take before the experiment terminates. If not specified, the default experiment timeout is 6 days. To specify a timeout less than or equal to 1 hour, make sure your dataset’s size is not greater than 10,000,000 (rows times column) or an error results, defaults to None
trial_timeout_minutes (Optional[int]) – Maximum time in minutes that each iteration can run for before it terminates. If not specified, a value of 1 month or 43200 minutes is used, defaults to None
- set_training(*, enable_onnx_compatible_models: bool | None = None, enable_dnn_training: bool | None = None, enable_model_explainability: bool | None = None, enable_stack_ensemble: bool | None = None, enable_vote_ensemble: bool | None = None, stack_ensemble_settings: StackEnsembleSettings | None = None, ensemble_model_download_timeout: int | None = None, allowed_training_algorithms: List[str] | None = None, blocked_training_algorithms: List[str] | None = None, training_mode: str | TrainingMode | None = None) None¶
The method to configure training related settings.
- Keyword Arguments:
enable_onnx_compatible_models (Optional[bool]) – Whether to enable or disable enforcing the ONNX-compatible models. The default is False. For more information about Open Neural Network Exchange (ONNX) and Azure Machine Learning,see this article.
enable_dnn_training (Optional[bool]) – Whether to include DNN based models during model selection. However, the default is True for DNN NLP tasks, and it’s False for all other AutoML tasks.
enable_model_explainability (Optional[bool]) – Whether to enable explaining the best AutoML model at the end of all AutoML training iterations. For more information, see Interpretability: model explanations in automated machine learning. , defaults to None
enable_stack_ensemble (Optional[bool]) – Whether to enable/disable StackEnsemble iteration. If enable_onnx_compatible_models flag is being set, then StackEnsemble iteration will be disabled. Similarly, for Timeseries tasks, StackEnsemble iteration will be disabled by default, to avoid risks of overfitting due to small training set used in fitting the meta learner. For more information about ensembles, see Ensemble configuration , defaults to None
enable_vote_ensemble (Optional[bool]) – Whether to enable/disable VotingEnsemble iteration. For more information about ensembles, see Ensemble configuration , defaults to None
stack_ensemble_settings (Optional[StackEnsembleSettings]) – Settings for StackEnsemble iteration, defaults to None
ensemble_model_download_timeout (Optional[int]) – During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. Configure this parameter with a higher value than 300 secs, if more time is needed, defaults to None
allowed_training_algorithms (Optional[List[str]]) – A list of model names to search for an experiment. If not specified, then all models supported for the task are used minus any specified in
blocked_training_algorithmsor deprecated TensorFlow models, defaults to Noneblocked_training_algorithms (Optional[List[str]]) – A list of algorithms to ignore for an experiment, defaults to None
training_mode (Optional[Union[str, azure.ai.ml.constants.TabularTrainingMode]]) –
[Experimental] The training mode to use. The possible values are-
distributed- enables distributed training for supported algorithms.
non_distributed- disables distributed training.
auto- Currently, it is same as non_distributed. In future, this might change.
Note: This parameter is in public preview and may change in future.
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property featurization: TabularFeaturizationSettings | None¶
Get the tabular featurization settings for the AutoML job.
- Returns:
Tabular featurization settings for the AutoML job
- Return type:
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: TabularLimitSettings | None¶
Get the tabular limits for the AutoML job.
- Returns:
Tabular limits for the AutoML job
- Return type:
- property log_verbosity: LogVerbosity¶
Get the log verbosity for the AutoML job.
- Returns:
log verbosity for the AutoML job
- Return type:
LogVerbosity
- property primary_metric: str | RegressionPrimaryMetrics¶
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training: RegressionTrainingSettings¶
Get the training settings for the AutoML job.
- Returns:
Training settings for the AutoML job.
- Return type:
- class azure.ai.ml.automl.RegressionModels(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Enum for all Regression models supported by AutoML.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- DECISION_TREE = 'DecisionTree'¶
Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features.
- ELASTIC_NET = 'ElasticNet'¶
Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.
- EXTREME_RANDOM_TREES = 'ExtremeRandomTrees'¶
Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.
- GRADIENT_BOOSTING = 'GradientBoosting'¶
The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.
- KNN = 'KNN'¶
K-nearest neighbors (KNN) algorithm uses ‘feature similarity’ to predict the values of new datapoints which further means that the new data point will be assigned a value based on how closely it matches the points in the training set.
- LASSO_LARS = 'LassoLars'¶
Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.
- LIGHT_GBM = 'LightGBM'¶
LightGBM is a gradient boosting framework that uses tree based learning algorithms.
- RANDOM_FOREST = 'RandomForest'¶
Random forest is a supervised learning algorithm. The “forest” it builds, is an ensemble of decision trees, usually trained with the bagging method. The general idea of the bagging method is that a combination of learning models increases the overall result.
- SGD = 'SGD'¶
Stochastic gradient descent is an optimization algorithm often used in machine learning applications to find the model parameters that correspond to the best fit between predicted and actual outputs. It’s an inexact but powerful technique.
- Type:
SGD
- XG_BOOST_REGRESSOR = 'XGBoostRegressor'¶
Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.
- Type:
XGBoostRegressor
- class azure.ai.ml.automl.RegressionPrimaryMetrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Primary metrics for Regression task.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- NORMALIZED_MEAN_ABSOLUTE_ERROR = 'NormalizedMeanAbsoluteError'¶
The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.
- NORMALIZED_ROOT_MEAN_SQUARED_ERROR = 'NormalizedRootMeanSquaredError'¶
The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.
- R2_SCORE = 'R2Score'¶
The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.
- SPEARMAN_CORRELATION = 'SpearmanCorrelation'¶
The Spearman’s rank coefficient of correlation is a nonparametric measure of rank correlation.
- class azure.ai.ml.automl.SamplingAlgorithmType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- BAYESIAN = 'Bayesian'¶
- GRID = 'Grid'¶
- RANDOM = 'Random'¶
- class azure.ai.ml.automl.SearchSpace(**kwargs: Any)[source]¶
SearchSpace class for AutoML verticals.
- class azure.ai.ml.automl.ShortSeriesHandlingConfiguration(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
The parameter defining how if AutoML should handle short time series.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- AUTO = 'Auto'¶
Short series will be padded if there are no long series, otherwise short series will be dropped.
- DROP = 'Drop'¶
All the short series will be dropped.
- NONE = 'None'¶
Represents no/null value.
- PAD = 'Pad'¶
All the short series will be padded.
- class azure.ai.ml.automl.StackEnsembleSettings(*, stack_meta_learner_k_wargs: Any | None = None, stack_meta_learner_train_percentage: float = 0.2, stack_meta_learner_type: StackMetaLearnerType | None = None, **kwargs: Any)[source]¶
Advance setting to customize StackEnsemble run.
- Parameters:
stack_meta_learner_k_wargs (any) – Optional parameters to pass to the initializer of the meta-learner.
stack_meta_learner_train_percentage (float) – Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2.
stack_meta_learner_type (str or StackMetaLearnerType) – The meta-learner is a model trained on the output of the individual heterogeneous models. Possible values include: “None”, “LogisticRegression”, “LogisticRegressionCV”, “LightGBMClassifier”, “ElasticNet”, “ElasticNetCV”, “LightGBMRegressor”, “LinearRegression”.
- class azure.ai.ml.automl.StochasticOptimizer(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Stochastic optimizer for image models.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- ADAM = 'Adam'¶
Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments.
- ADAMW = 'Adamw'¶
AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay.
- NONE = 'None'¶
No optimizer selected.
- SGD = 'Sgd'¶
Stochastic Gradient Descent optimizer.
- class azure.ai.ml.automl.TabularFeaturizationSettings(*, blocked_transformers: List[BlockedTransformers | str] | None = None, column_name_and_types: Dict[str, str] | None = None, dataset_language: str | None = None, transformer_params: Dict[str, List[ColumnTransformer]] | None = None, mode: str | None = None, enable_dnn_featurization: bool | None = None)[source]¶
Featurization settings for an AutoML Job.
- Parameters:
blocked_transformers (List[Union[BlockedTransformers, str]]) – A list of transformers to ignore when featurizing.
column_name_and_types (Dict[str, str]) – A dictionary of column names and feature types used to update column purpose.
dataset_language (str) – The language of the dataset.
transformer_params (Dict[str, List[ColumnTransformer]]) – A dictionary of transformers and their parameters.
mode (str) – The mode of the featurization.
enable_dnn_featurization (bool) – Whether to enable DNN featurization.
- Variables:
type (str) – Specifies the type of FeaturizationSettings. Set automatically to “Tabular” for this class.
- property blocked_transformers: List[BlockedTransformers | str] | None¶
A list of transformers to ignore when featurizing.
- class azure.ai.ml.automl.TabularLimitSettings(*, enable_early_termination: bool | None = None, exit_score: float | None = None, max_concurrent_trials: int | None = None, max_cores_per_trial: int | None = None, max_nodes: int | None = None, max_trials: int | None = None, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None)[source]¶
Limit settings for a AutoML Table Verticals.
- Parameters:
enable_early_termination (bool) – Whether to enable early termination if the score is not improving in the short term. The default is True.
exit_score (float) – Target score for experiment. The experiment terminates after this score is reached.
max_concurrent_trials (int) – Maximum number of concurrent AutoML iterations.
max_cores_per_trial (int) – The maximum number of threads to use for a given training iteration.
max_nodes (int) –
[Experimental] The maximum number of nodes to use for distributed training.
For forecasting, each model is trained using max(2, int(max_nodes / max_concurrent_trials)) nodes.
For classification/regression, each model is trained using max_nodes nodes.
Note- This parameter is in public preview and might change in future.
max_trials (int) – Maximum number of AutoML iterations.
timeout_minutes (int) – AutoML job timeout.
trial_timeout_minutes (int) – AutoML job timeout.
- class azure.ai.ml.automl.TargetAggregationFunction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Target aggregate function.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- MAX = 'Max'¶
- MEAN = 'Mean'¶
- MIN = 'Min'¶
- NONE = 'None'¶
Represent no value set.
- SUM = 'Sum'¶
- class azure.ai.ml.automl.TargetLagsMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Target lags selection modes.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- AUTO = 'Auto'¶
Target lags to be determined automatically.
- CUSTOM = 'Custom'¶
Use the custom target lags.
- class azure.ai.ml.automl.TargetRollingWindowSizeMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Target rolling windows size mode.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- AUTO = 'Auto'¶
Determine rolling windows size automatically.
- CUSTOM = 'Custom'¶
Use the specified rolling window size.
- class azure.ai.ml.automl.TextClassificationJob(*, target_column_name: str | None = None, training_data: Input | None = None, validation_data: Input | None = None, primary_metric: ClassificationPrimaryMetrics | None = None, log_verbosity: str | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Text Classification Job.
- Parameters:
target_column_name (Optional[str]) – The name of the target column, defaults to None
training_data (Optional[Input]) – Training data to be used for training, defaults to None
validation_data (Optional[Input]) – Validation data to be used for evaluating the trained model, defaults to None
primary_metric (Optional[ClassificationPrimaryMetrics]) – The primary metric to be displayed, defaults to None
log_verbosity (Optional[str]) – Log verbosity level, defaults to None
Example:
creating an automl text classification job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes text_classification_job = automl.TextClassificationJob( 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="terms", tags={"my_custom_tag": "My custom value"}, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add (a) search space(s) for an AutoML NLP job.
- Parameters:
value (Union[SearchSpace, List[SearchSpace]]) – either a SearchSpace object or a list of SearchSpace objects with nlp-specific parameters.
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input) None¶
Define data configuration for NLP job
- Keyword Arguments:
training_data – Training data
target_column_name – Column name of the target column.
validation_data – Validation data
- set_featurization(*, dataset_language: str | None = None) None¶
Define featurization configuration for AutoML NLP job.
- Keyword Arguments:
dataset_language – Language of the dataset, defaults to None
- set_limits(*, max_trials: int = 1, max_concurrent_trials: int = 1, max_nodes: int = 1, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None) None¶
Define limit configuration for AutoML NLP job
- Keyword Arguments:
max_trials – Maximum number of AutoML iterations, defaults to 1
max_concurrent_trials – Maximum number of concurrent AutoML iterations, defaults to 1
max_nodes – Maximum number of nodes used for sweep, defaults to 1
timeout_minutes – Timeout for the AutoML job, defaults to None
trial_timeout_minutes – Timeout for each AutoML trial, defaults to None
- set_sweep(*, sampling_algorithm: str | SamplingAlgorithmType, early_termination: EarlyTerminationPolicy | None = None) None¶
Define sweep configuration for AutoML NLP job
- Keyword Arguments:
sampling_algorithm – Required. Specifies type of hyperparameter sampling algorithm. Possible values include: “Grid”, “Random”, and “Bayesian”.
early_termination – Optional. early termination policy to end poorly performing training candidates, defaults to None.
- set_training_parameters(*, gradient_accumulation_steps: int | None = None, learning_rate: float | None = None, learning_rate_scheduler: str | NlpLearningRateScheduler | None = None, model_name: str | None = None, number_of_epochs: int | None = None, training_batch_size: int | None = None, validation_batch_size: int | None = None, warmup_ratio: float | None = None, weight_decay: float | None = None) None¶
Fix certain training parameters throughout the training procedure for all candidates.
- Keyword Arguments:
gradient_accumulation_steps – number of steps over which to accumulate gradients before a backward pass. This must be a positive integer., defaults to None
learning_rate – initial learning rate. Must be a float in (0, 1)., defaults to None
learning_rate_scheduler – the type of learning rate scheduler. Must choose from ‘linear’, ‘cosine’, ‘cosine_with_restarts’, ‘polynomial’, ‘constant’, and ‘constant_with_warmup’., defaults to None
model_name – the model name to use during training. Must choose from ‘bert-base-cased’, ‘bert-base-uncased’, ‘bert-base-multilingual-cased’, ‘bert-base-german-cased’, ‘bert-large-cased’, ‘bert-large-uncased’, ‘distilbert-base-cased’, ‘distilbert-base-uncased’, ‘roberta-base’, ‘roberta-large’, ‘distilroberta-base’, ‘xlm-roberta-base’, ‘xlm-roberta-large’, xlnet-base-cased’, and ‘xlnet-large-cased’., defaults to None
number_of_epochs – the number of epochs to train with. Must be a positive integer., defaults to None
training_batch_size – the batch size during training. Must be a positive integer., defaults to None
validation_batch_size – the batch size during validation. Must be a positive integer., defaults to None
warmup_ratio – ratio of total training steps used for a linear warmup from 0 to learning_rate. Must be a float in [0, 1]., defaults to None
weight_decay – value of weight decay when optimizer is sgd, adam, or adamw. This must be a float in the range [0, 1]., defaults to None
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property featurization: NlpFeaturizationSettings | None¶
Featurization settings used for NLP job
- Returns:
featurization settings
- Return type:
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: NlpLimitSettings¶
Limit settings for NLP jobs
- Returns:
limit configuration for NLP job
- Return type:
- property log_verbosity: LogVerbosity¶
Log verbosity configuration
- Returns:
the degree of verbosity used in logging
- Return type:
LogVerbosity
- property primary_metric: str | ClassificationPrimaryMetrics¶
Primary metric to display from NLP job
- Returns:
primary metric to display
- Return type:
- property search_space: List[NlpSearchSpace] | None¶
Search space(s) to sweep over for NLP sweep jobs
- Returns:
list of search spaces to sweep over for NLP jobs
- Return type:
List[NlpSearchSpace]
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: NlpSweepSettings | None¶
Sweep settings used for NLP job
- Returns:
sweep settings
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: NlpFixedParameters | None¶
Parameters that are used for all submitted jobs.
- Returns:
fixed training parameters for NLP jobs
- Return type:
- class azure.ai.ml.automl.TextClassificationMultilabelJob(*, target_column_name: str | None = None, training_data: Input | None = None, validation_data: Input | None = None, primary_metric: str | None = None, log_verbosity: str | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Text Classification Multilabel Job.
- Parameters:
target_column_name (Optional[str]) – The name of the target column, defaults to None
training_data (Optional[Input]) – Training data to be used for training, defaults to None
validation_data (Optional[Input]) – Validation data to be used for evaluating the trained model, defaults to None
primary_metric (Optional[str]) – The primary metric to be displayed., defaults to None
log_verbosity (Optional[str]) – Log verbosity level, defaults to None
Example:
creating an automl text classification multilabel job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes text_classification_multilabel_job = automl.TextClassificationMultilabelJob( 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="terms", primary_metric="accuracy", tags={"my_custom_tag": "My custom value"}, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add (a) search space(s) for an AutoML NLP job.
- Parameters:
value (Union[SearchSpace, List[SearchSpace]]) – either a SearchSpace object or a list of SearchSpace objects with nlp-specific parameters.
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input) None¶
Define data configuration for NLP job
- Keyword Arguments:
training_data – Training data
target_column_name – Column name of the target column.
validation_data – Validation data
- set_featurization(*, dataset_language: str | None = None) None¶
Define featurization configuration for AutoML NLP job.
- Keyword Arguments:
dataset_language – Language of the dataset, defaults to None
- set_limits(*, max_trials: int = 1, max_concurrent_trials: int = 1, max_nodes: int = 1, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None) None¶
Define limit configuration for AutoML NLP job
- Keyword Arguments:
max_trials – Maximum number of AutoML iterations, defaults to 1
max_concurrent_trials – Maximum number of concurrent AutoML iterations, defaults to 1
max_nodes – Maximum number of nodes used for sweep, defaults to 1
timeout_minutes – Timeout for the AutoML job, defaults to None
trial_timeout_minutes – Timeout for each AutoML trial, defaults to None
- set_sweep(*, sampling_algorithm: str | SamplingAlgorithmType, early_termination: EarlyTerminationPolicy | None = None) None¶
Define sweep configuration for AutoML NLP job
- Keyword Arguments:
sampling_algorithm – Required. Specifies type of hyperparameter sampling algorithm. Possible values include: “Grid”, “Random”, and “Bayesian”.
early_termination – Optional. early termination policy to end poorly performing training candidates, defaults to None.
- set_training_parameters(*, gradient_accumulation_steps: int | None = None, learning_rate: float | None = None, learning_rate_scheduler: str | NlpLearningRateScheduler | None = None, model_name: str | None = None, number_of_epochs: int | None = None, training_batch_size: int | None = None, validation_batch_size: int | None = None, warmup_ratio: float | None = None, weight_decay: float | None = None) None¶
Fix certain training parameters throughout the training procedure for all candidates.
- Keyword Arguments:
gradient_accumulation_steps – number of steps over which to accumulate gradients before a backward pass. This must be a positive integer., defaults to None
learning_rate – initial learning rate. Must be a float in (0, 1)., defaults to None
learning_rate_scheduler – the type of learning rate scheduler. Must choose from ‘linear’, ‘cosine’, ‘cosine_with_restarts’, ‘polynomial’, ‘constant’, and ‘constant_with_warmup’., defaults to None
model_name – the model name to use during training. Must choose from ‘bert-base-cased’, ‘bert-base-uncased’, ‘bert-base-multilingual-cased’, ‘bert-base-german-cased’, ‘bert-large-cased’, ‘bert-large-uncased’, ‘distilbert-base-cased’, ‘distilbert-base-uncased’, ‘roberta-base’, ‘roberta-large’, ‘distilroberta-base’, ‘xlm-roberta-base’, ‘xlm-roberta-large’, xlnet-base-cased’, and ‘xlnet-large-cased’., defaults to None
number_of_epochs – the number of epochs to train with. Must be a positive integer., defaults to None
training_batch_size – the batch size during training. Must be a positive integer., defaults to None
validation_batch_size – the batch size during validation. Must be a positive integer., defaults to None
warmup_ratio – ratio of total training steps used for a linear warmup from 0 to learning_rate. Must be a float in [0, 1]., defaults to None
weight_decay – value of weight decay when optimizer is sgd, adam, or adamw. This must be a float in the range [0, 1]., defaults to None
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property featurization: NlpFeaturizationSettings | None¶
Featurization settings used for NLP job
- Returns:
featurization settings
- Return type:
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: NlpLimitSettings¶
Limit settings for NLP jobs
- Returns:
limit configuration for NLP job
- Return type:
- property log_verbosity: LogVerbosity¶
Log verbosity configuration
- Returns:
the degree of verbosity used in logging
- Return type:
LogVerbosity
- property primary_metric: str | ClassificationMultilabelPrimaryMetrics¶
Primary metric to display from NLP job
- Returns:
primary metric to display
- Return type:
- property search_space: List[NlpSearchSpace] | None¶
Search space(s) to sweep over for NLP sweep jobs
- Returns:
list of search spaces to sweep over for NLP jobs
- Return type:
List[NlpSearchSpace]
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: NlpSweepSettings | None¶
Sweep settings used for NLP job
- Returns:
sweep settings
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: NlpFixedParameters | None¶
Parameters that are used for all submitted jobs.
- Returns:
fixed training parameters for NLP jobs
- Return type:
- class azure.ai.ml.automl.TextNerJob(*, training_data: Input | None = None, validation_data: Input | None = None, primary_metric: str | None = None, log_verbosity: str | None = None, **kwargs: Any)[source]¶
Configuration for AutoML Text NER Job.
- Parameters:
training_data (Optional[Input]) – Training data to be used for training, defaults to None
validation_data (Optional[Input]) – Validation data to be used for evaluating the trained model, defaults to None
primary_metric (Optional[str]) – The primary metric to be displayed, defaults to None
log_verbosity (Optional[str]) – Log verbosity level, defaults to None
Example:
creating an automl text ner job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes text_ner_job = automl.TextNerJob( 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"}, )
Initialize AutoMLVertical.
Constructor for AutoMLVertical.
- Parameters:
- Raises:
ValueError – If task_type is not one of “classification”, “regression”, “forecasting”.
ValueError – If training_data is not of type Input.
ValueError – If validation_data is not of type Input.
ValueError – If test_data is not of type Input.
- dump(dest: str | PathLike | IO, **kwargs: Any) None¶
Dumps the job content into a file in YAML format.
- Parameters:
dest (Union[PathLike, str, IO[AnyStr]]) – 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.
- Raises:
FileExistsError – Raised if dest is a file path and the file already exists.
IOError – Raised if dest is an open file and the file is not writable.
- extend_search_space(value: SearchSpace | List[SearchSpace]) None¶
Add (a) search space(s) for an AutoML NLP job.
- Parameters:
value (Union[SearchSpace, List[SearchSpace]]) – either a SearchSpace object or a list of SearchSpace objects with nlp-specific parameters.
- set_data(*, training_data: Input, target_column_name: str, validation_data: Input) None¶
Define data configuration for NLP job
- Keyword Arguments:
training_data – Training data
target_column_name – Column name of the target column.
validation_data – Validation data
- set_featurization(*, dataset_language: str | None = None) None¶
Define featurization configuration for AutoML NLP job.
- Keyword Arguments:
dataset_language – Language of the dataset, defaults to None
- set_limits(*, max_trials: int = 1, max_concurrent_trials: int = 1, max_nodes: int = 1, timeout_minutes: int | None = None, trial_timeout_minutes: int | None = None) None¶
Define limit configuration for AutoML NLP job
- Keyword Arguments:
max_trials – Maximum number of AutoML iterations, defaults to 1
max_concurrent_trials – Maximum number of concurrent AutoML iterations, defaults to 1
max_nodes – Maximum number of nodes used for sweep, defaults to 1
timeout_minutes – Timeout for the AutoML job, defaults to None
trial_timeout_minutes – Timeout for each AutoML trial, defaults to None
- set_sweep(*, sampling_algorithm: str | SamplingAlgorithmType, early_termination: EarlyTerminationPolicy | None = None) None¶
Define sweep configuration for AutoML NLP job
- Keyword Arguments:
sampling_algorithm – Required. Specifies type of hyperparameter sampling algorithm. Possible values include: “Grid”, “Random”, and “Bayesian”.
early_termination – Optional. early termination policy to end poorly performing training candidates, defaults to None.
- set_training_parameters(*, gradient_accumulation_steps: int | None = None, learning_rate: float | None = None, learning_rate_scheduler: str | NlpLearningRateScheduler | None = None, model_name: str | None = None, number_of_epochs: int | None = None, training_batch_size: int | None = None, validation_batch_size: int | None = None, warmup_ratio: float | None = None, weight_decay: float | None = None) None¶
Fix certain training parameters throughout the training procedure for all candidates.
- Keyword Arguments:
gradient_accumulation_steps – number of steps over which to accumulate gradients before a backward pass. This must be a positive integer., defaults to None
learning_rate – initial learning rate. Must be a float in (0, 1)., defaults to None
learning_rate_scheduler – the type of learning rate scheduler. Must choose from ‘linear’, ‘cosine’, ‘cosine_with_restarts’, ‘polynomial’, ‘constant’, and ‘constant_with_warmup’., defaults to None
model_name – the model name to use during training. Must choose from ‘bert-base-cased’, ‘bert-base-uncased’, ‘bert-base-multilingual-cased’, ‘bert-base-german-cased’, ‘bert-large-cased’, ‘bert-large-uncased’, ‘distilbert-base-cased’, ‘distilbert-base-uncased’, ‘roberta-base’, ‘roberta-large’, ‘distilroberta-base’, ‘xlm-roberta-base’, ‘xlm-roberta-large’, xlnet-base-cased’, and ‘xlnet-large-cased’., defaults to None
number_of_epochs – the number of epochs to train with. Must be a positive integer., defaults to None
training_batch_size – the batch size during training. Must be a positive integer., defaults to None
validation_batch_size – the batch size during validation. Must be a positive integer., defaults to None
warmup_ratio – ratio of total training steps used for a linear warmup from 0 to learning_rate. Must be a float in [0, 1]., defaults to None
weight_decay – value of weight decay when optimizer is sgd, adam, or adamw. This must be a float in the range [0, 1]., defaults to None
- property base_path: str¶
The base path of the resource.
- Returns:
The base path of the resource.
- Return type:
- property creation_context: SystemData | None¶
The creation context of the resource.
- Returns:
The creation metadata for the resource.
- Return type:
Optional[SystemData]
- property featurization: NlpFeaturizationSettings | None¶
Featurization settings used for NLP job
- Returns:
featurization settings
- Return type:
- property id: str | None¶
The resource ID.
- Returns:
The global ID of the resource, an Azure Resource Manager (ARM) ID.
- Return type:
Optional[str]
- property limits: NlpLimitSettings¶
Limit settings for NLP jobs
- Returns:
limit configuration for NLP job
- Return type:
- property log_verbosity: LogVerbosity¶
Log verbosity configuration
- Returns:
the degree of verbosity used in logging
- Return type:
LogVerbosity
- property primary_metric: str | ClassificationPrimaryMetrics¶
Primary metric to display from NLP job
- Returns:
primary metric to display
- Return type:
- property search_space: List[NlpSearchSpace] | None¶
Search space(s) to sweep over for NLP sweep jobs
- Returns:
list of search spaces to sweep over for NLP jobs
- Return type:
List[NlpSearchSpace]
- property status: str | None¶
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:
Status of the job.
- Return type:
Optional[str]
- property studio_url: str | None¶
Azure ML studio endpoint.
- Returns:
The URL to the job details page.
- Return type:
Optional[str]
- property sweep: NlpSweepSettings | None¶
Sweep settings used for NLP job
- Returns:
sweep settings
- Return type:
- property task_type: str¶
Get task type.
- Returns:
The type of task to run. Possible values include: “classification”, “regression”, “forecasting”.
- Return type:
- property training_parameters: NlpFixedParameters | None¶
Parameters that are used for all submitted jobs.
- Returns:
fixed training parameters for NLP jobs
- Return type:
- class azure.ai.ml.automl.TrainingSettings(*, enable_onnx_compatible_models: bool | None = None, enable_dnn_training: bool | None = None, enable_model_explainability: bool | None = None, enable_stack_ensemble: bool | None = None, enable_vote_ensemble: bool | None = None, stack_ensemble_settings: StackEnsembleSettings | None = None, ensemble_model_download_timeout: int | None = None, allowed_training_algorithms: List[str] | None = None, blocked_training_algorithms: List[str] | None = None, training_mode: str | TrainingMode | None = None)[source]¶
TrainingSettings class for Azure Machine Learning.
TrainingSettings class for Azure Machine Learning.
- Parameters:
enable_onnx_compatible_models (Optional[bool]) – If set to True, the model will be trained to be compatible with ONNX
enable_dnn_training (Optional[bool]) – If set to True,the model will use DNN training
enable_model_explainability (Optional[bool]) – If set to True, the model will be trained to be explainable
enable_stack_ensemble (Optional[bool]) – If set to True, a final ensemble model will be created using a stack of models
enable_vote_ensemble (Optional[bool]) – If set to True, a final ensemble model will be created using a voting ensemble
stack_ensemble_settings (Optional[azure.ai.ml.automl.StackEnsembleSettings]) – Settings for stack ensemble
ensemble_model_download_timeout (Optional[List[int]]) – Timeout for downloading ensemble models
allowed_training_algorithms (Optional[List[str]]) – Models to train
blocked_training_algorithms (Optional[List[str]]) – Models that will not be considered for training
training_mode (Optional[Union[str, azure.ai.ml.constants.TabularTrainingMode]]) –
[Experimental] The training mode to use. The possible values are-
distributed- enables distributed training for supported algorithms.
non_distributed- disables distributed training.
auto- Currently, it is same as non_distributed. In future, this might change.
Note: This parameter is in public preview and may change in future.
- property training_mode: TrainingMode | None¶
- class azure.ai.ml.automl.UseStl(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Configure STL Decomposition of the time-series target column.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- NONE = 'None'¶
No stl decomposition.
- SEASON = 'Season'¶
- SEASON_TREND = 'SeasonTrend'¶
- class azure.ai.ml.automl.ValidationMetricType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Metric computation method to use for validation metrics in image tasks.
- capitalize()¶
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
- casefold()¶
Return a version of the string suitable for caseless comparisons.
- center(width, fillchar=' ', /)¶
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
- count(sub[, start[, end]]) int¶
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
- encode(encoding='utf-8', errors='strict')¶
Encode the string using the codec registered for encoding.
- encoding
The encoding in which to encode the string.
- errors
The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
- endswith(suffix[, start[, end]]) bool¶
Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
- expandtabs(tabsize=8)¶
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(*args, **kwargs) str¶
Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
- format_map(mapping) str¶
Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
- index(sub[, start[, end]]) int¶
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- isalnum()¶
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
- isalpha()¶
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
- isascii()¶
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
- isdecimal()¶
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
- isdigit()¶
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
- isidentifier()¶
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
- islower()¶
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
- isnumeric()¶
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
- isprintable()¶
Return True if the string is printable, False otherwise.
A string is printable if all of its characters are considered printable in repr() or if it is empty.
- isspace()¶
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
- istitle()¶
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
- isupper()¶
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
- join(iterable, /)¶
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
- ljust(width, fillchar=' ', /)¶
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
- lower()¶
Return a copy of the string converted to lowercase.
- lstrip(chars=None, /)¶
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
- static maketrans()¶
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
- removeprefix(prefix, /)¶
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
- removesuffix(suffix, /)¶
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
- replace(old, new, count=-1, /)¶
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
- rfind(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(sub[, start[, end]]) int¶
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.
Raises ValueError when the substring is not found.
- rjust(width, fillchar=' ', /)¶
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
- rpartition(sep, /)¶
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
- rsplit(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
- rstrip(chars=None, /)¶
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- split(sep=None, maxsplit=-1)¶
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
- splitlines(keepends=False)¶
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
- startswith(prefix[, start[, end]]) bool¶
Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
- strip(chars=None, /)¶
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
- swapcase()¶
Convert uppercase characters to lowercase and lowercase characters to uppercase.
- title()¶
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
- translate(table, /)¶
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
- upper()¶
Return a copy of the string converted to uppercase.
- zfill(width, /)¶
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
- COCO = 'Coco'¶
Coco metric.
- COCO_VOC = 'CocoVoc'¶
CocoVoc metric.
- NONE = 'None'¶
No metric.
- VOC = 'Voc'¶
Voc metric.
- azure.ai.ml.automl.classification(*, training_data: Input, target_column_name: str, primary_metric: str | None = None, enable_model_explainability: bool | None = None, weight_column_name: str | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, n_cross_validations: str | int | None = None, cv_split_column_names: List[str] | None = None, test_data: Input | None = None, test_data_size: float | None = None, **kwargs) ClassificationJob[source]¶
Function to create a ClassificationJob.
A classification job is used to train a model that best predict the class of a data sample. Various models are trained using the training data. The model with the best performance on the validation data based on the primary metric is selected as the final model.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment. It should contain both training features and a label column (optionally a sample weights column).
target_column_name (str) – The name of the label column. This parameter is applicable to
training_data,validation_dataandtest_dataparametersprimary_metric –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: accuracy, AUC_weighted, norm_macro_recall, average_precision_score_weighted, and precision_score_weighted Defaults to accuracy
enable_model_explainability (bool) – Whether to enable explaining the best AutoML model at the end of all AutoML training iterations. The default is None. For more information, see Interpretability: model explanations in automated machine learning.
weight_column_name (str) –
The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. If the input data is from a pandas.DataFrame which doesn’t have column names, column indices can be used instead, expressed as integers.
This parameter is applicable to
training_dataandvalidation_dataparametersvalidation_data (Input) –
The validation data to be used within the experiment. It should contain both training features and label column (optionally a sample weights column).
Defaults to None
validation_data_size (float) –
What fraction of the data to hold out for validation when user validation data is not specified. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setn_cross_validationsorvalidation_data_sizeto extract validation data out of the specified training data. For custom cross validation fold, usecv_split_column_names.For more information, see Configure data splits and cross-validation in automated machine learning.
Defaults to None
n_cross_validations (Union[str, int]) –
How many cross validations to perform when user validation data is not specified.
Specify
validation_datato provide validation data, otherwise setn_cross_validationsorvalidation_data_sizeto extract validation data out of the specified training data. For custom cross validation fold, usecv_split_column_names.For more information, see Configure data splits and cross-validation in automated machine learning.
Defaults to None
cv_split_column_names (List[str]) –
List of names of the columns that contain custom cross validation split. Each of the CV split columns represents one CV split where each row are either marked 1 for training or 0 for validation.
Defaults to None
test_data (Input) –
The Model Test feature using test datasets or test data splits is a feature in Preview state and might change at any time. The test data to be used for a test run that will automatically be started after model training is complete. The test run will get predictions using the best model and will compute metrics given these predictions.
If this parameter or the
test_data_sizeparameter are not specified then no test run will be executed automatically after model training is completed. Test data should contain both features and label column. Iftest_datais specified then thetarget_column_nameparameter must be specified.Defaults to None
test_data_size (float) –
The Model Test feature using test datasets or test data splits is a feature in Preview state and might change at any time. What fraction of the training data to hold out for test data for a test run that will automatically be started after model training is complete. The test run will get predictions using the best model and will compute metrics given these predictions.
This should be between 0.0 and 1.0 non-inclusive. If
test_data_sizeis specified at the same time asvalidation_data_size, then the test data is split fromtraining_databefore the validation data is split. For example, ifvalidation_data_size=0.1,test_data_size=0.1and the original training data has 1000 rows, then the test data will have 100 rows, the validation data will contain 90 rows and the training data will have 810 rows.For regression based tasks, random sampling is used. For classification tasks, stratified sampling is used. Forecasting does not currently support specifying a test dataset using a train/test split.
If this parameter or the
test_dataparameter are not specified then no test run will be executed automatically after model training is completed.Defaults to None
- Returns:
A job object that can be submitted to an Azure ML compute for execution.
- Return type:
- azure.ai.ml.automl.forecasting(*, training_data: Input, target_column_name: str, primary_metric: str | None = None, enable_model_explainability: bool | None = None, weight_column_name: str | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, n_cross_validations: str | int | None = None, cv_split_column_names: List[str] | None = None, test_data: Input | None = None, test_data_size: float | None = None, forecasting_settings: ForecastingSettings | None = None, **kwargs) ForecastingJob[source]¶
Function to create a Forecasting job.
A forecasting task is used to predict target values for a future time period based on the historical data. Various models are trained using the training data. The model with the best performance on the validation data based on the primary metric is selected as the final model.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment. It should contain both training features and a label column (optionally a sample weights column).
target_column_name (str) – The name of the label column. This parameter is applicable to
training_data,validation_dataandtest_dataparametersprimary_metric –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: r2_score, normalized_mean_absolute_error, normalized_root_mean_squared_error Defaults to normalized_root_mean_squared_error
enable_model_explainability (bool) – Whether to enable explaining the best AutoML model at the end of all AutoML training iterations. The default is None. For more information, see Interpretability: model explanations in automated machine learning.
weight_column_name (str) –
The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. If the input data is from a pandas.DataFrame which doesn’t have column names, column indices can be used instead, expressed as integers.
This parameter is applicable to
training_dataandvalidation_dataparametersvalidation_data (Input) –
The validation data to be used within the experiment. It should contain both training features and label column (optionally a sample weights column).
Defaults to None
validation_data_size (float) –
What fraction of the data to hold out for validation when user validation data is not specified. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setn_cross_validationsorvalidation_data_sizeto extract validation data out of the specified training data. For custom cross validation fold, usecv_split_column_names.For more information, see Configure data splits and cross-validation in automated machine learning.
Defaults to None
n_cross_validations (Union[str, int]) –
How many cross validations to perform when user validation data is not specified.
Specify
validation_datato provide validation data, otherwise setn_cross_validationsorvalidation_data_sizeto extract validation data out of the specified training data. For custom cross validation fold, usecv_split_column_names.For more information, see Configure data splits and cross-validation in automated machine learning.
Defaults to None
cv_split_column_names (List[str]) –
List of names of the columns that contain custom cross validation split. Each of the CV split columns represents one CV split where each row are either marked 1 for training or 0 for validation.
Defaults to None
test_data (Input) –
The Model Test feature using test datasets or test data splits is a feature in Preview state and might change at any time. The test data to be used for a test run that will automatically be started after model training is complete. The test run will get predictions using the best model and will compute metrics given these predictions.
If this parameter or the
test_data_sizeparameter are not specified then no test run will be executed automatically after model training is completed. Test data should contain both features and label column. Iftest_datais specified then thetarget_column_nameparameter must be specified.Defaults to None
test_data_size (float) –
The Model Test feature using test datasets or test data splits is a feature in Preview state and might change at any time. What fraction of the training data to hold out for test data for a test run that will automatically be started after model training is complete. The test run will get predictions using the best model and will compute metrics given these predictions.
This should be between 0.0 and 1.0 non-inclusive. If
test_data_sizeis specified at the same time asvalidation_data_size, then the test data is split fromtraining_databefore the validation data is split. For example, ifvalidation_data_size=0.1,test_data_size=0.1and the original training data has 1000 rows, then the test data will have 100 rows, the validation data will contain 90 rows and the training data will have 810 rows.For regression based tasks, random sampling is used. For classification tasks, stratified sampling is used. Forecasting does not currently support specifying a test dataset using a train/test split.
If this parameter or the
test_dataparameter are not specified then no test run will be executed automatically after model training is completed.Defaults to None
forecasting_settings (ForecastingSettings) – The settings for the forecasting task
- Returns:
A job object that can be submitted to an Azure ML compute for execution.
- Return type:
- azure.ai.ml.automl.image_classification(*, training_data: Input, target_column_name: str, primary_metric: str | ClassificationPrimaryMetrics | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, **kwargs) ImageClassificationJob[source]¶
Creates an object for AutoML Image multi-class Classification job.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment.
target_column_name (str) – The name of the label column. This parameter is applicable to
training_dataandvalidation_dataparameters.primary_metric (Union[str, ClassificationPrimaryMetrics]) –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: accuracy, AUC_weighted, norm_macro_recall, average_precision_score_weighted, and precision_score_weighted Defaults to accuracy.
validation_data (Optional[Input]) – The validation data to be used within the experiment.
validation_data_size (float) –
What fraction of the data to hold out for validation when user validation data is not specified. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setvalidation_data_sizeto extract validation data out of the specified training data.Defaults to .2
- Returns:
Image classification job object that can be submitted to an Azure ML compute for execution.
- Return type:
Example:
creating an automl image classification job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes from azure.ai.ml.automl import ClassificationMultilabelPrimaryMetrics image_classification_job = automl.image_classification( 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=ClassificationMultilabelPrimaryMetrics.ACCURACY, tags={"my_custom_tag": "My custom value"}, )
- azure.ai.ml.automl.image_classification_multilabel(*, training_data: Input, target_column_name: str, primary_metric: str | ClassificationMultilabelPrimaryMetrics | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, **kwargs) ImageClassificationMultilabelJob[source]¶
Creates an object for AutoML Image multi-label Classification job.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment.
target_column_name (str) – The name of the label column. This parameter is applicable to
training_dataandvalidation_dataparameters.primary_metric (Union[str, ClassificationMultilabelPrimaryMetrics]) –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: accuracy, AUC_weighted, norm_macro_recall, average_precision_score_weighted, precision_score_weighted, and Iou Defaults to Iou.
validation_data (Optional[Input]) – The validation data to be used within the experiment.
validation_data_size (float) –
The fraction of the training data to hold out for validation when user does not provide the validation data. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setvalidation_data_sizeto extract validation data out of the specified training data.Defaults to .2
- Returns:
Image multi-label classification job object that can be submitted to an Azure ML compute for execution.
- Return type:
Example:
creating an automl image multilabel classification job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes from azure.ai.ml.automl import ClassificationMultilabelPrimaryMetrics image_classification_multilabel_job = automl.image_classification_multilabel( 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=ClassificationMultilabelPrimaryMetrics.IOU, tags={"my_custom_tag": "My custom value"}, )
- azure.ai.ml.automl.image_instance_segmentation(*, training_data: Input, target_column_name: str, primary_metric: str | InstanceSegmentationPrimaryMetrics | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, **kwargs) ImageInstanceSegmentationJob[source]¶
Creates an object for AutoML Image Instance Segmentation job.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment.
target_column_name (str) – The name of the label column. This parameter is applicable to
training_dataandvalidation_dataparameters.primary_metric (Union[str, InstanceSegmentationPrimaryMetrics]) –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: MeanAveragePrecision Defaults to MeanAveragePrecision.
validation_data (Optional[Input]) – The validation data to be used within the experiment.
validation_data_size (float) –
The fraction of the training data to hold out for validation when user does not provide the validation data. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setvalidation_data_sizeto extract validation data out of the specified training data.Defaults to .2
- Returns:
Image instance segmentation job
- Return type:
Example:
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 InstanceSegmentationPrimaryMetrics image_instance_segmentation_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=InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, tags={"my_custom_tag": "My custom value"}, )
- azure.ai.ml.automl.image_object_detection(*, training_data: Input, target_column_name: str, primary_metric: str | ObjectDetectionPrimaryMetrics | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, **kwargs) ImageObjectDetectionJob[source]¶
Creates an object for AutoML Image Object Detection job.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment.
target_column_name (str) – The name of the label column. This parameter is applicable to
training_dataandvalidation_dataparameters.primary_metric (Union[str, ObjectDetectionPrimaryMetrics]) –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: MeanAveragePrecision Defaults to MeanAveragePrecision.
validation_data (Optional[Input]) – The validation data to be used within the experiment.
validation_data_size (float) –
The fraction of the training data to hold out for validation when user does not provide the validation data. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setvalidation_data_sizeto extract validation data out of the specified training data.Defaults to .2
- Returns:
Image object detection job object that can be submitted to an Azure ML compute for execution.
- Return type:
Example:
creating an automl image object detection job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes from azure.ai.ml.automl import ObjectDetectionPrimaryMetrics image_object_detection_job = automl.image_object_detection( 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=ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, tags={"my_custom_tag": "My custom value"}, )
- azure.ai.ml.automl.regression(*, training_data: Input, target_column_name: str, primary_metric: str | None = None, enable_model_explainability: bool | None = None, weight_column_name: str | None = None, validation_data: Input | None = None, validation_data_size: float | None = None, n_cross_validations: str | int | None = None, cv_split_column_names: List[str] | None = None, test_data: Input | None = None, test_data_size: float | None = None, **kwargs) RegressionJob[source]¶
Function to create a Regression Job.
A regression job is used to train a model to predict continuous values of a target variable from a dataset. Various models are trained using the training data. The model with the best performance on the validation data based on the primary metric is selected as the final model.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment. It should contain both training features and a label column (optionally a sample weights column).
target_column_name (str) – The name of the label column. This parameter is applicable to
training_data,validation_dataandtest_dataparametersprimary_metric –
The metric that Automated Machine Learning will optimize for model selection. Automated Machine Learning collects more metrics than it can optimize. For more information on how metrics are calculated, see https://docs.microsoft.com/azure/machine-learning/how-to-configure-auto-train#primary-metric.
Acceptable values: spearman_correlation, r2_score, normalized_mean_absolute_error, normalized_root_mean_squared_error. Defaults to normalized_root_mean_squared_error
enable_model_explainability (bool) – Whether to enable explaining the best AutoML model at the end of all AutoML training iterations. The default is None. For more information, see Interpretability: model explanations in automated machine learning.
weight_column_name (str) –
The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. If the input data is from a pandas.DataFrame which doesn’t have column names, column indices can be used instead, expressed as integers.
This parameter is applicable to
training_dataandvalidation_dataparametersvalidation_data (Input) –
The validation data to be used within the experiment. It should contain both training features and label column (optionally a sample weights column).
Defaults to None
validation_data_size (float) –
What fraction of the data to hold out for validation when user validation data is not specified. This should be between 0.0 and 1.0 non-inclusive.
Specify
validation_datato provide validation data, otherwise setn_cross_validationsorvalidation_data_sizeto extract validation data out of the specified training data. For custom cross validation fold, usecv_split_column_names.For more information, see Configure data splits and cross-validation in automated machine learning.
Defaults to None
n_cross_validations (Union[str, int]) –
How many cross validations to perform when user validation data is not specified.
Specify
validation_datato provide validation data, otherwise setn_cross_validationsorvalidation_data_sizeto extract validation data out of the specified training data. For custom cross validation fold, usecv_split_column_names.For more information, see Configure data splits and cross-validation in automated machine learning.
Defaults to None
cv_split_column_names (List[str]) –
List of names of the columns that contain custom cross validation split. Each of the CV split columns represents one CV split where each row are either marked 1 for training or 0 for validation.
Defaults to None
test_data (Input) –
The Model Test feature using test datasets or test data splits is a feature in Preview state and might change at any time. The test data to be used for a test run that will automatically be started after model training is complete. The test run will get predictions using the best model and will compute metrics given these predictions.
If this parameter or the
test_data_sizeparameter are not specified then no test run will be executed automatically after model training is completed. Test data should contain both features and label column. Iftest_datais specified then thetarget_column_nameparameter must be specified.Defaults to None
test_data_size (float) –
The Model Test feature using test datasets or test data splits is a feature in Preview state and might change at any time. What fraction of the training data to hold out for test data for a test run that will automatically be started after model training is complete. The test run will get predictions using the best model and will compute metrics given these predictions.
This should be between 0.0 and 1.0 non-inclusive. If
test_data_sizeis specified at the same time asvalidation_data_size, then the test data is split fromtraining_databefore the validation data is split. For example, ifvalidation_data_size=0.1,test_data_size=0.1and the original training data has 1000 rows, then the test data will have 100 rows, the validation data will contain 90 rows and the training data will have 810 rows.For regression based tasks, random sampling is used. For classification tasks, stratified sampling is used. Forecasting does not currently support specifying a test dataset using a train/test split.
If this parameter or the
test_dataparameter are not specified then no test run will be executed automatically after model training is completed.Defaults to None
- Returns:
A job object that can be submitted to an Azure ML compute for execution.
- Return type:
- azure.ai.ml.automl.text_classification(*, training_data: Input, target_column_name: str, validation_data: Input, primary_metric: str | None = None, log_verbosity: str | None = None, **kwargs) TextClassificationJob[source]¶
Function to create a TextClassificationJob.
A text classification job is used to train a model that can predict the class/category of a text data. Input training data should include a target column that classifies the text into exactly one class.
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment. It should contain both training features and a target column.
target_column_name (str) – Name of the target column.
validation_data (Input) – The validation data to be used within the experiment. It should contain both training features and a target column.
primary_metric (Union[str, ClassificationPrimaryMetrics]) – Primary metric for the task. Acceptable values: accuracy, AUC_weighted, precision_score_weighted
log_verbosity (str) – Log verbosity level.
- Returns:
The TextClassificationJob object.
- Return type:
Example:
creating an automl text classification job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes test_classification_job = automl.text_classification( 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="Sentiment", primary_metric="accuracy", tags={"my_custom_tag": "My custom value"}, )
- azure.ai.ml.automl.text_classification_multilabel(*, training_data: Input, target_column_name: str, validation_data: Input, primary_metric: str | None = None, log_verbosity: str | None = None, **kwargs) TextClassificationMultilabelJob[source]¶
Function to create a TextClassificationMultilabelJob.
A text classification multilabel job is used to train a model that can predict the classes/categories of a text data. Input training data should include a target column that classifies the text into class(es). For more information on format of multilabel data, refer to: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-nlp-models#multi-label
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment. It should contain both training features and a target column.
target_column_name (str) – Name of the target column.
validation_data (Input) – The validation data to be used within the experiment. It should contain both training features and a target column.
primary_metric (str) – Primary metric for the task. Acceptable values: accuracy
log_verbosity (str) – Log verbosity level.
- Returns:
The TextClassificationMultilabelJob object.
- Return type:
Example:
creating an automl text multilabel classification job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes text_classification_multilabel_job = automl.text_classification_multilabel( 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="terms", primary_metric="accuracy", tags={"my_custom_tag": "My custom value"}, )
- azure.ai.ml.automl.text_ner(*, training_data: Input, validation_data: Input, primary_metric: str | None = None, log_verbosity: str | None = None, **kwargs) TextNerJob[source]¶
Function to create a TextNerJob.
A text named entity recognition job is used to train a model that can predict the named entities in the text. Input training data should be a text file in CoNLL format. For more information on format of text NER data, refer to: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-nlp-models#named-entity-recognition-ner
- Keyword Arguments:
training_data (Input) – The training data to be used within the experiment. It should contain both training features and a target column.
validation_data (Input) – The validation data to be used within the experiment. It should contain both training features and a target column.
primary_metric (str) – Primary metric for the task. Acceptable values: accuracy
log_verbosity (str) – Log verbosity level.
- Returns:
The TextNerJob object.
- Return type:
Example:
creating an automl text ner job¶from azure.ai.ml import automl, Input from azure.ai.ml.constants import AssetTypes text_ner_job = automl.text_ner( 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"}, )