AutoML | R Documentation |
A class for creating and interacting with SageMaker AutoML jobs.
new()
Initialize AutoML class Place holder doc string
AutoML$new( role, target_attribute_name, output_kms_key = NULL, output_path = NULL, base_job_name = NULL, compression_type = NULL, sagemaker_session = NULL, volume_kms_key = NULL, encrypt_inter_container_traffic = FALSE, vpc_config = NULL, problem_type = NULL, max_candidates = NULL, max_runtime_per_training_job_in_seconds = NULL, total_job_runtime_in_seconds = NULL, job_objective = NULL, generate_candidate_definitions_only = FALSE, tags = NULL )
role
:
target_attribute_name
:
output_kms_key
:
output_path
:
base_job_name
:
compression_type
:
sagemaker_session
:
volume_kms_key
:
encrypt_inter_container_traffic
:
vpc_config
:
problem_type
:
max_candidates
:
max_runtime_per_training_job_in_seconds
:
total_job_runtime_in_seconds
:
job_objective
:
generate_candidate_definitions_only
:
tags
:
fit()
Create an AutoML Job with the input dataset.
AutoML$fit(inputs = NULL, wait = TRUE, logs = TRUE, job_name = NULL)
inputs
(str or list[str] or AutoMLInput): Local path or S3 Uri where the training data is stored. Or an AutoMLInput object. If a local path is provided, the dataset will be uploaded to an S3 location.
wait
(bool): Whether the call should wait until the job completes (default: True).
logs
(bool): Whether to show the logs produced by the job. Only meaningful when wait is True (default: True). if “wait“ is False, “logs“ will be set to False as well.
job_name
(str): Training job name. If not specified, the estimator generates a default job name, based on the training image name and current timestamp.
attach()
Attach to an existing AutoML job. Creates and returns a AutoML bound to an existing automl job.
AutoML$attach(auto_ml_job_name, sagemaker_session = NULL)
auto_ml_job_name
(str): AutoML job name
sagemaker_session
(sagemaker.session.Session): A SageMaker Session object, used for SageMaker interactions (default: None). If not specified, the one originally associated with the “AutoML“ instance is used.
sagemaker.automl.AutoML: A “AutoML“ instance with the attached automl job.
describe_auto_ml_job()
Returns the job description of an AutoML job for the given job name.
AutoML$describe_auto_ml_job(job_name = NULL)
job_name
(str): The name of the AutoML job to describe. If None, will use object's latest_auto_ml_job name.
dict: A dictionary response with the AutoML Job description.
best_candidate()
Returns the best candidate of an AutoML job for a given name.
AutoML$best_candidate(job_name = NULL)
job_name
(str): The name of the AutoML job. If None, will use object's .current_auto_ml_job_name.
dict: A dictionary with information of the best candidate.
list_candidates()
Returns the list of candidates of an AutoML job for a given name.
AutoML$list_candidates( job_name = NULL, status_equals = NULL, candidate_name = NULL, candidate_arn = NULL, sort_order = NULL, sort_by = NULL, max_results = NULL )
job_name
(str): The name of the AutoML job. If None, will use object's .current_job name.
status_equals
(str): Filter the result with candidate status, values could be "Completed", "InProgress", "Failed", "Stopped", "Stopping"
candidate_name
(str): The name of a specified candidate to list. Default to None.
candidate_arn
(str): The Arn of a specified candidate to list. Default to None.
sort_order
(str): The order that the candidates will be listed in result. Default to None.
sort_by
(str): The value that the candidates will be sorted by. Default to None.
max_results
(int): The number of candidates will be listed in results, between 1 to 100. Default to None. If None, will return all the candidates.
list: A list of dictionaries with candidates information.
create_model()
Creates a model from a given candidate or the best candidate from the job.
AutoML$create_model( name, sagemaker_session = NULL, candidate = NULL, vpc_config = NULL, enable_network_isolation = FALSE, model_kms_key = NULL, predictor_cls = NULL, inference_response_keys = NULL )
name
(str): The pipeline model name.
sagemaker_session
(sagemaker.session.Session): A SageMaker Session object, used for SageMaker interactions (default: None). If not specified, the one originally associated with the “AutoML“ instance is used.:
candidate
(CandidateEstimator or dict): a CandidateEstimator used for deploying to a SageMaker Inference Pipeline. If None, the best candidate will be used. If the candidate input is a dict, a CandidateEstimator will be created from it.
vpc_config
(dict): Specifies a VPC that your training jobs and hosted models have access to. Contents include "SecurityGroupIds" and "Subnets".
enable_network_isolation
(bool): Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. Default: False
model_kms_key
(str): KMS key ARN used to encrypt the repacked model archive file if the model is repacked
predictor_cls
(callable[string, sagemaker.session.Session]): A function to call to create a predictor (default: None). If specified, “deploy()“ returns the result of invoking this function on the created endpoint name.
inference_response_keys
(list): List of keys for response content. The order of the keys will dictate the content order in the response.
PipelineModel object.
deploy()
Deploy a candidate to a SageMaker Inference Pipeline.
AutoML$deploy( initial_instance_count, instance_type, serializer = NULL, deserializer = NULL, candidate = NULL, sagemaker_session = NULL, name = NULL, endpoint_name = NULL, tags = NULL, wait = TRUE, vpc_config = NULL, enable_network_isolation = FALSE, model_kms_key = NULL, predictor_cls = NULL, inference_response_keys = NULL )
initial_instance_count
(int): The initial number of instances to run in the “Endpoint“ created from this “Model“.
instance_type
(str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge'.
serializer
(:class:'~sagemaker.serializers.BaseSerializer'): A serializer object, used to encode data for an inference endpoint (default: None). If “serializer“ is not None, then “serializer“ will override the default serializer. The default serializer is set by the “predictor_cls“.
deserializer
(:class:'~sagemaker.deserializers.BaseDeserializer'): A deserializer object, used to decode data from an inference
candidate
(CandidateEstimator or dict): a CandidateEstimator used for deploying to a SageMaker Inference Pipeline. If None, the best candidate will be used. If the candidate input is a dict, a CandidateEstimator will be created from it.
sagemaker_session
(sagemaker.session.Session): A SageMaker Session object, used for SageMaker interactions (default: None). If not specified, the one originally associated with the “AutoML“ instance is used.
name
(str): The pipeline model name. If None, a default model name will be selected on each “deploy“.
endpoint_name
(str): The name of the endpoint to create (default: None). If not specified, a unique endpoint name will be created.
tags
(List[dict[str, str]]): The list of tags to attach to this specific endpoint.
wait
(bool): Whether the call should wait until the deployment of model completes (default: True).
vpc_config
(dict): Specifies a VPC that your training jobs and hosted models have access to. Contents include "SecurityGroupIds" and "Subnets".
enable_network_isolation
(bool): Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. Default: False
model_kms_key
(str): KMS key ARN used to encrypt the repacked model archive file if the model is repacked
predictor_cls
(callable[string, sagemaker.session.Session]): A function to call to create a predictor (default: None). If specified, “deploy()“ returns the result of invoking this function on the created endpoint name.
inference_response_keys
(list): List of keys for response content. The order of the keys will dictate the content order in the response.
endpoint
(default: None). If “deserializer“ is not None, then “deserializer“ will override the default deserializer. The default deserializer is set by the “predictor_cls“.
callable[string, sagemaker.session.Session] or “None“: If “predictor_cls“ is specified, the invocation of “self.predictor_cls“ on the created endpoint name. Otherwise, “None“.
validate_and_update_inference_response()
Validates the requested inference keys and updates response content. On validation, also updates the inference containers to emit appropriate response content in the inference response.
AutoML$validate_and_update_inference_response( inference_containers, inference_response_keys )
inference_containers
(list): list of inference containers
inference_response_keys
(list): list of inference response keys
format()
format class
AutoML$format()
clone()
The objects of this class are cloneable with this method.
AutoML$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.