Class: Aws::SageMaker::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SageMaker::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-sagemaker/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_tags(params = {}) ⇒ Types::AddTagsOutput
Adds or overwrites one or more tags for the specified Amazon SageMaker resource.
-
#create_algorithm(params = {}) ⇒ Types::CreateAlgorithmOutput
Create a machine learning algorithm that you can use in Amazon SageMaker and list in the AWS Marketplace.
-
#create_code_repository(params = {}) ⇒ Types::CreateCodeRepositoryOutput
Creates a Git repository as a resource in your Amazon SageMaker account.
-
#create_compilation_job(params = {}) ⇒ Types::CreateCompilationJobResponse
Starts a model compilation job.
-
#create_endpoint(params = {}) ⇒ Types::CreateEndpointOutput
Creates an endpoint using the endpoint configuration specified in the request.
-
#create_endpoint_config(params = {}) ⇒ Types::CreateEndpointConfigOutput
Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy models.
-
#create_hyper_parameter_tuning_job(params = {}) ⇒ Types::CreateHyperParameterTuningJobResponse
Starts a hyperparameter tuning job.
-
#create_labeling_job(params = {}) ⇒ Types::CreateLabelingJobResponse
Creates a job that uses workers to label the data objects in your input dataset.
-
#create_model(params = {}) ⇒ Types::CreateModelOutput
Creates a model in Amazon SageMaker.
-
#create_model_package(params = {}) ⇒ Types::CreateModelPackageOutput
Creates a model package that you can use to create Amazon SageMaker models or list on AWS Marketplace.
-
#create_notebook_instance(params = {}) ⇒ Types::CreateNotebookInstanceOutput
Creates an Amazon SageMaker notebook instance.
-
#create_notebook_instance_lifecycle_config(params = {}) ⇒ Types::CreateNotebookInstanceLifecycleConfigOutput
Creates a lifecycle configuration that you can associate with a notebook instance.
-
#create_presigned_notebook_instance_url(params = {}) ⇒ Types::CreatePresignedNotebookInstanceUrlOutput
Returns a URL that you can use to connect to the Jupyter server from a notebook instance.
-
#create_training_job(params = {}) ⇒ Types::CreateTrainingJobResponse
Starts a model training job.
-
#create_transform_job(params = {}) ⇒ Types::CreateTransformJobResponse
Starts a transform job.
-
#create_workteam(params = {}) ⇒ Types::CreateWorkteamResponse
Creates a new work team for labeling your data.
-
#delete_algorithm(params = {}) ⇒ Struct
Removes the specified algorithm from your account.
-
#delete_code_repository(params = {}) ⇒ Struct
Deletes the specified Git repository from your account.
-
#delete_endpoint(params = {}) ⇒ Struct
Deletes an endpoint.
-
#delete_endpoint_config(params = {}) ⇒ Struct
Deletes an endpoint configuration.
-
#delete_model(params = {}) ⇒ Struct
Deletes a model.
-
#delete_model_package(params = {}) ⇒ Struct
Deletes a model package.
-
#delete_notebook_instance(params = {}) ⇒ Struct
Deletes an Amazon SageMaker notebook instance.
-
#delete_notebook_instance_lifecycle_config(params = {}) ⇒ Struct
Deletes a notebook instance lifecycle configuration.
-
#delete_tags(params = {}) ⇒ Struct
Deletes the specified tags from an Amazon SageMaker resource.
-
#delete_workteam(params = {}) ⇒ Types::DeleteWorkteamResponse
Deletes an existing work team.
-
#describe_algorithm(params = {}) ⇒ Types::DescribeAlgorithmOutput
Returns a description of the specified algorithm that is in your account.
-
#describe_code_repository(params = {}) ⇒ Types::DescribeCodeRepositoryOutput
Gets details about the specified Git repository.
-
#describe_compilation_job(params = {}) ⇒ Types::DescribeCompilationJobResponse
Returns information about a model compilation job.
-
#describe_endpoint(params = {}) ⇒ Types::DescribeEndpointOutput
Returns the description of an endpoint.
-
#describe_endpoint_config(params = {}) ⇒ Types::DescribeEndpointConfigOutput
Returns the description of an endpoint configuration created using the ‘CreateEndpointConfig` API.
-
#describe_hyper_parameter_tuning_job(params = {}) ⇒ Types::DescribeHyperParameterTuningJobResponse
Gets a description of a hyperparameter tuning job.
-
#describe_labeling_job(params = {}) ⇒ Types::DescribeLabelingJobResponse
Gets information about a labeling job.
-
#describe_model(params = {}) ⇒ Types::DescribeModelOutput
Describes a model that you created using the ‘CreateModel` API.
-
#describe_model_package(params = {}) ⇒ Types::DescribeModelPackageOutput
Returns a description of the specified model package, which is used to create Amazon SageMaker models or list them on AWS Marketplace.
-
#describe_notebook_instance(params = {}) ⇒ Types::DescribeNotebookInstanceOutput
Returns information about a notebook instance.
-
#describe_notebook_instance_lifecycle_config(params = {}) ⇒ Types::DescribeNotebookInstanceLifecycleConfigOutput
Returns a description of a notebook instance lifecycle configuration.
-
#describe_subscribed_workteam(params = {}) ⇒ Types::DescribeSubscribedWorkteamResponse
Gets information about a work team provided by a vendor.
-
#describe_training_job(params = {}) ⇒ Types::DescribeTrainingJobResponse
Returns information about a training job.
-
#describe_transform_job(params = {}) ⇒ Types::DescribeTransformJobResponse
Returns information about a transform job.
-
#describe_workteam(params = {}) ⇒ Types::DescribeWorkteamResponse
Gets information about a specific work team.
-
#get_search_suggestions(params = {}) ⇒ Types::GetSearchSuggestionsResponse
An auto-complete API for the search functionality in the Amazon SageMaker console.
-
#list_algorithms(params = {}) ⇒ Types::ListAlgorithmsOutput
Lists the machine learning algorithms that have been created.
-
#list_code_repositories(params = {}) ⇒ Types::ListCodeRepositoriesOutput
Gets a list of the Git repositories in your account.
-
#list_compilation_jobs(params = {}) ⇒ Types::ListCompilationJobsResponse
Lists model compilation jobs that satisfy various filters.
-
#list_endpoint_configs(params = {}) ⇒ Types::ListEndpointConfigsOutput
Lists endpoint configurations.
-
#list_endpoints(params = {}) ⇒ Types::ListEndpointsOutput
Lists endpoints.
-
#list_hyper_parameter_tuning_jobs(params = {}) ⇒ Types::ListHyperParameterTuningJobsResponse
Gets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter tuning jobs launched in your account.
-
#list_labeling_jobs(params = {}) ⇒ Types::ListLabelingJobsResponse
Gets a list of labeling jobs.
-
#list_labeling_jobs_for_workteam(params = {}) ⇒ Types::ListLabelingJobsForWorkteamResponse
Gets a list of labeling jobs assigned to a specified work team.
-
#list_model_packages(params = {}) ⇒ Types::ListModelPackagesOutput
Lists the model packages that have been created.
-
#list_models(params = {}) ⇒ Types::ListModelsOutput
Lists models created with the [CreateModel] API.
-
#list_notebook_instance_lifecycle_configs(params = {}) ⇒ Types::ListNotebookInstanceLifecycleConfigsOutput
Lists notebook instance lifestyle configurations created with the CreateNotebookInstanceLifecycleConfig API.
-
#list_notebook_instances(params = {}) ⇒ Types::ListNotebookInstancesOutput
Returns a list of the Amazon SageMaker notebook instances in the requester’s account in an AWS Region.
-
#list_subscribed_workteams(params = {}) ⇒ Types::ListSubscribedWorkteamsResponse
Gets a list of the work teams that you are subscribed to in the AWS Marketplace.
-
#list_tags(params = {}) ⇒ Types::ListTagsOutput
Returns the tags for the specified Amazon SageMaker resource.
-
#list_training_jobs(params = {}) ⇒ Types::ListTrainingJobsResponse
Lists training jobs.
-
#list_training_jobs_for_hyper_parameter_tuning_job(params = {}) ⇒ Types::ListTrainingJobsForHyperParameterTuningJobResponse
Gets a list of TrainingJobSummary objects that describe the training jobs that a hyperparameter tuning job launched.
-
#list_transform_jobs(params = {}) ⇒ Types::ListTransformJobsResponse
Lists transform jobs.
-
#list_workteams(params = {}) ⇒ Types::ListWorkteamsResponse
Gets a list of work teams that you have defined in a region.
-
#render_ui_template(params = {}) ⇒ Types::RenderUiTemplateResponse
Renders the UI template so that you can preview the worker’s experience.
-
#search(params = {}) ⇒ Types::SearchResponse
Finds Amazon SageMaker resources that match a search query.
-
#start_notebook_instance(params = {}) ⇒ Struct
Launches an ML compute instance with the latest version of the libraries and attaches your ML storage volume.
-
#stop_compilation_job(params = {}) ⇒ Struct
Stops a model compilation job.
-
#stop_hyper_parameter_tuning_job(params = {}) ⇒ Struct
Stops a running hyperparameter tuning job and all running training jobs that the tuning job launched.
-
#stop_labeling_job(params = {}) ⇒ Struct
Stops a running labeling job.
-
#stop_notebook_instance(params = {}) ⇒ Struct
Terminates the ML compute instance.
-
#stop_training_job(params = {}) ⇒ Struct
Stops a training job.
-
#stop_transform_job(params = {}) ⇒ Struct
Stops a transform job.
-
#update_code_repository(params = {}) ⇒ Types::UpdateCodeRepositoryOutput
Updates the specified Git repository with the specified values.
-
#update_endpoint(params = {}) ⇒ Types::UpdateEndpointOutput
Deploys the new ‘EndpointConfig` specified in the request, switches to using newly created endpoint, and then deletes resources provisioned for the endpoint using the previous `EndpointConfig` (there is no availability loss).
-
#update_endpoint_weights_and_capacities(params = {}) ⇒ Types::UpdateEndpointWeightsAndCapacitiesOutput
Updates variant weight of one or more variants associated with an existing endpoint, or capacity of one variant associated with an existing endpoint.
-
#update_notebook_instance(params = {}) ⇒ Struct
Updates a notebook instance.
-
#update_notebook_instance_lifecycle_config(params = {}) ⇒ Struct
Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig API.
-
#update_workteam(params = {}) ⇒ Types::UpdateWorkteamResponse
Updates an existing work team with new member definitions or description.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
212 213 214 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 212 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5951 5952 5953 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5951 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5954 5955 5956 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5954 def errors_module Errors end |
Instance Method Details
#add_tags(params = {}) ⇒ Types::AddTagsOutput
Adds or overwrites one or more tags for the specified Amazon SageMaker resource. You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, models, endpoint configurations, and endpoints.
Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see For more information, see [AWS Tagging Strategies].
<note markdown=“1”> Tags that you add to a hyperparameter tuning job by calling this API are also added to any training jobs that the hyperparameter tuning job launches after you call this API, but not to training jobs that the hyperparameter tuning job launched before you called this API. To make sure that the tags associated with a hyperparameter tuning job are also added to all training jobs that the hyperparameter tuning job launches, add the tags when you first create the tuning job by specifying them in the ‘Tags` parameter of CreateHyperParameterTuningJob
</note>
[1]: aws.amazon.com/answers/account-management/aws-tagging-strategies/
277 278 279 280 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 277 def (params = {}, = {}) req = build_request(:add_tags, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5804 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-sagemaker' context[:gem_version] = '1.29.0' Seahorse::Client::Request.new(handlers, context) end |
#create_algorithm(params = {}) ⇒ Types::CreateAlgorithmOutput
Create a machine learning algorithm that you can use in Amazon SageMaker and list in the AWS Marketplace.
499 500 501 502 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 499 def create_algorithm(params = {}, = {}) req = build_request(:create_algorithm, params) req.send_request() end |
#create_code_repository(params = {}) ⇒ Types::CreateCodeRepositoryOutput
Creates a Git repository as a resource in your Amazon SageMaker account. You can associate the repository with notebook instances so that you can use Git source control for the notebooks you create. The Git repository is a resource in your Amazon SageMaker account, so it can be associated with more than one notebook instance, and it persists independently from the lifecycle of any notebook instances it is associated with.
The repository can be hosted either in [AWS CodeCommit] or in any other Git repository.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/welcome.html
551 552 553 554 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 551 def create_code_repository(params = {}, = {}) req = build_request(:create_code_repository, params) req.send_request() end |
#create_compilation_job(params = {}) ⇒ Types::CreateCompilationJobResponse
Starts a model compilation job. After the model has been compiled, Amazon SageMaker saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) bucket that you specify.
If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts with AWS IoT Greengrass. In that case, deploy them as an ML resource.
In the request body, you provide the following:
-
A name for the compilation job
-
Information about the input model artifacts
-
The output location for the compiled model and the device (target) that the model runs on
-
‘The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform the model compilation job`
You can also provide a ‘Tag` to track the model compilation job’s resource use and costs. The response body contains the ‘CompilationJobArn` for the compiled job.
To stop a model compilation job, use StopCompilationJob. To get information about a particular model compilation job, use DescribeCompilationJob. To get information about multiple model compilation jobs, use ListCompilationJobs.
656 657 658 659 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 656 def create_compilation_job(params = {}, = {}) req = build_request(:create_compilation_job, params) req.send_request() end |
#create_endpoint(params = {}) ⇒ Types::CreateEndpointOutput
Creates an endpoint using the endpoint configuration specified in the request. Amazon SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the
- CreateEndpointConfig][1
-
API.
<note markdown=“1”> Use this API only for hosting models using Amazon SageMaker hosting services.
</note>
The endpoint name must be unique within an AWS Region in your AWS account.
When it receives the request, Amazon SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them.
When Amazon SageMaker receives the request, it sets the endpoint status to ‘Creating`. After it creates the endpoint, it sets the status to `InService`. Amazon SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the
- DescribeEndpoint][2
-
API.
For an example, see [Exercise 1: Using the K-Means Algorithm Provided by Amazon SageMaker].
If any of the models hosted at this endpoint get model data from an Amazon S3 location, Amazon SageMaker uses AWS Security Token Service to download model artifacts from the S3 path you provided. AWS STS is activated in your IAM user account by default. If you previously deactivated AWS STS for a region, you need to reactivate AWS STS for that region. For more information, see [Activating and Deactivating AWS STS i an AWS Region] in the *AWS Identity and Access Management User Guide*.
[1]: docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html [2]: docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html [3]: docs.aws.amazon.com/sagemaker/latest/dg/ex1.html [4]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
749 750 751 752 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 749 def create_endpoint(params = {}, = {}) req = build_request(:create_endpoint, params) req.send_request() end |
#create_endpoint_config(params = {}) ⇒ Types::CreateEndpointConfigOutput
Creates an endpoint configuration that Amazon SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the ‘CreateModel` API, to deploy and the resources that you want Amazon SageMaker to provision. Then you call the [CreateEndpoint] API.
<note markdown=“1”> Use this API only if you want to use Amazon SageMaker hosting services to deploy models into production.
</note>
In the request, you define one or more ‘ProductionVariant`s, each of which identifies a model. Each `ProductionVariant` parameter also describes the resources that you want Amazon SageMaker to provision. This includes the number and type of ML compute instances to deploy.
If you are hosting multiple models, you also assign a ‘VariantWeight` to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. Amazon SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.
[1]: docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html
842 843 844 845 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 842 def create_endpoint_config(params = {}, = {}) req = build_request(:create_endpoint_config, params) req.send_request() end |
#create_hyper_parameter_tuning_job(params = {}) ⇒ Types::CreateHyperParameterTuningJobResponse
Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version of a model by running many training jobs on your dataset using the algorithm you choose and values for hyperparameters within ranges that you specify. It then chooses the hyperparameter values that result in a model that performs the best, as measured by an objective metric that you choose.
1029 1030 1031 1032 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1029 def create_hyper_parameter_tuning_job(params = {}, = {}) req = build_request(:create_hyper_parameter_tuning_job, params) req.send_request() end |
#create_labeling_job(params = {}) ⇒ Types::CreateLabelingJobResponse
Creates a job that uses workers to label the data objects in your input dataset. You can use the labeled data to train machine learning models.
You can select your workforce from one of three providers:
-
A private workforce that you create. It can include employees, contractors, and outside experts. Use a private workforce when want the data to stay within your organization or when a specific set of skills is required.
-
One or more vendors that you select from the AWS Marketplace. Vendors provide expertise in specific areas.
-
The Amazon Mechanical Turk workforce. This is the largest workforce, but it should only be used for public data or data that has been stripped of any personally identifiable information.
You can also use *automated data labeling* to reduce the number of data objects that need to be labeled by a human. Automated data labeling uses *active learning* to determine if a data object can be labeled by machine or if it needs to be sent to a human worker. For more information, see [Using Automated Data Labeling].
The data objects to be labeled are contained in an Amazon S3 bucket. You create a *manifest file* that describes the location of each object. For more information, see [Using Input and Output Data].
The output can be used as the manifest file for another labeling job or as training data for your machine learning models.
[1]: docs.aws.amazon.com/sagemaker/latest/dg/sms-automated-labeling.html [2]: docs.aws.amazon.com/sagemaker/latest/dg/sms-data.html
1231 1232 1233 1234 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1231 def create_labeling_job(params = {}, = {}) req = build_request(:create_labeling_job, params) req.send_request() end |
#create_model(params = {}) ⇒ Types::CreateModelOutput
Creates a model in Amazon SageMaker. In the request, you name the model and describe a primary container. For the primary container, you specify the docker image containing inference code, artifacts (from prior training), and custom environment map that the inference code uses when you deploy the model for predictions.
Use this API to create a model if you want to use Amazon SageMaker hosting services or run a batch transform job.
To host your model, you create an endpoint configuration with the ‘CreateEndpointConfig` API, and then create an endpoint with the `CreateEndpoint` API. Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment.
To run a batch transform using your model, you start a job with the ‘CreateTransformJob` API. Amazon SageMaker uses your model and your dataset to get inferences which are then saved to a specified S3 location.
In the ‘CreateModel` request, you must define a container with the `PrimaryContainer` parameter.
In the request, you also provide an IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances or for batch transform jobs. In addition, you also use the IAM role to manage permissions the inference code needs. For example, if the inference code access any other AWS resources, you grant necessary permissions via this role.
1373 1374 1375 1376 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1373 def create_model(params = {}, = {}) req = build_request(:create_model, params) req.send_request() end |
#create_model_package(params = {}) ⇒ Types::CreateModelPackageOutput
Creates a model package that you can use to create Amazon SageMaker models or list on AWS Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace to create models in Amazon SageMaker.
To create a model package by specifying a Docker container that contains your inference code and the Amazon S3 location of your model artifacts, provide values for ‘InferenceSpecification`. To create a model from an algorithm resource that you created or subscribed to in AWS Marketplace, provide a value for `SourceAlgorithmSpecification`.
1500 1501 1502 1503 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1500 def create_model_package(params = {}, = {}) req = build_request(:create_model_package, params) req.send_request() end |
#create_notebook_instance(params = {}) ⇒ Types::CreateNotebookInstanceOutput
Creates an Amazon SageMaker notebook instance. A notebook instance is a machine learning (ML) compute instance running on a Jupyter notebook.
In a ‘CreateNotebookInstance` request, specify the type of ML compute instance that you want to run. Amazon SageMaker launches the instance, installs common libraries that you can use to explore datasets for model training, and attaches an ML storage volume to the notebook instance.
Amazon SageMaker also provides a set of example notebooks. Each notebook demonstrates how to use Amazon SageMaker with a specific algorithm or with a machine learning framework.
After receiving the request, Amazon SageMaker does the following:
-
Creates a network interface in the Amazon SageMaker VPC.
-
(Option) If you specified ‘SubnetId`, Amazon SageMaker creates a network interface in your own VPC, which is inferred from the subnet ID that you provide in the input. When creating this network interface, Amazon SageMaker attaches the security group that you specified in the request to the network interface that it creates in your VPC.
-
Launches an EC2 instance of the type specified in the request in the Amazon SageMaker VPC. If you specified ‘SubnetId` of your VPC, Amazon SageMaker specifies both network interfaces when launching this instance. This enables inbound traffic from your own VPC to the notebook instance, assuming that the security groups allow it.
After creating the notebook instance, Amazon SageMaker returns its Amazon Resource Name (ARN).
After Amazon SageMaker creates the notebook instance, you can connect to the Jupyter server and work in Jupyter notebooks. For example, you can write code to explore a dataset that you can use for model training, train a model, host models by creating Amazon SageMaker endpoints, and validate hosted models.
For more information, see [How It Works].
[1]: docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html
1711 1712 1713 1714 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1711 def create_notebook_instance(params = {}, = {}) req = build_request(:create_notebook_instance, params) req.send_request() end |
#create_notebook_instance_lifecycle_config(params = {}) ⇒ Types::CreateNotebookInstanceLifecycleConfigOutput
Creates a lifecycle configuration that you can associate with a notebook instance. A *lifecycle configuration* is a collection of shell scripts that run when you create or start a notebook instance.
Each lifecycle configuration script has a limit of 16384 characters.
The value of the ‘$PATH` environment variable that is available to both scripts is `/sbin:bin:/usr/sbin:/usr/bin`.
View CloudWatch Logs for notebook instance lifecycle configurations in log group ‘/aws/sagemaker/NotebookInstances` in log stream `[notebook-instance-name]/`.
Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.
For information about notebook instance lifestyle configurations, see [Step 2.1: (Optional) Customize a Notebook Instance].
[1]: docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html
1780 1781 1782 1783 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1780 def create_notebook_instance_lifecycle_config(params = {}, = {}) req = build_request(:create_notebook_instance_lifecycle_config, params) req.send_request() end |
#create_presigned_notebook_instance_url(params = {}) ⇒ Types::CreatePresignedNotebookInstanceUrlOutput
Returns a URL that you can use to connect to the Jupyter server from a notebook instance. In the Amazon SageMaker console, when you choose ‘Open` next to a notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from the notebook instance. The console uses this API to get the URL and show the page.
You can restrict access to this API and to the URL that it returns to a list of IP addresses that you specify. To restrict access, attach an IAM policy that denies access to this API unless the call comes from an IP address in the specified list to every AWS Identity and Access Management user, group, or role used to access the notebook instance. Use the ‘NotIpAddress` condition operator and the `aws:SourceIP` condition context key to specify the list of IP addresses that you want to have access to the notebook instance. For more information, see [Limit Access to a Notebook Instance by IP Address].
[1]: docs.aws.amazon.com/sagemaker/latest/dg/nbi-ip-filter.html
1830 1831 1832 1833 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 1830 def create_presigned_notebook_instance_url(params = {}, = {}) req = build_request(:create_presigned_notebook_instance_url, params) req.send_request() end |
#create_training_job(params = {}) ⇒ Types::CreateTrainingJobResponse
Starts a model training job. After training completes, Amazon SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.
If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than Amazon SageMaker, provided that you know how to use them for inferences.
In the request body, you provide the following:
-
‘AlgorithmSpecification` - Identifies the training algorithm to use.
-
‘HyperParameters` - Specify these algorithm-specific parameters to influence the quality of the final model. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see [Algorithms].
-
‘InputDataConfig` - Describes the training dataset and the Amazon S3 location where it is stored.
-
‘OutputDataConfig` - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.
-
‘ResourceConfig` - Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training. In distributed training, you specify more than one instance.
-
‘RoleARN` - The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during model training. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete model training.
-
‘StoppingCondition` - Sets a duration for training. Use this parameter to cap model training costs.
For more information about Amazon SageMaker, see [How It Works].
[1]: docs.aws.amazon.com/sagemaker/latest/dg/algos.html [2]: docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html
2100 2101 2102 2103 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2100 def create_training_job(params = {}, = {}) req = build_request(:create_training_job, params) req.send_request() end |
#create_transform_job(params = {}) ⇒ Types::CreateTransformJobResponse
Starts a transform job. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.
To perform batch transformations, you create a transform job and use the data that you have readily available.
In the request body, you provide the following:
-
‘TransformJobName` - Identifies the transform job. The name must be unique within an AWS Region in an AWS account.
-
‘ModelName` - Identifies the model to use. `ModelName` must be the name of an existing Amazon SageMaker model in the same AWS Region and AWS account. For information on creating a model, see CreateModel.
-
‘TransformInput` - Describes the dataset to be transformed and the Amazon S3 location where it is stored.
-
‘TransformOutput` - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.
-
‘TransformResources` - Identifies the ML compute instances for the transform job.
For more information about how batch transformation works Amazon SageMaker, see [How It Works].
[1]: docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html
2260 2261 2262 2263 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2260 def create_transform_job(params = {}, = {}) req = build_request(:create_transform_job, params) req.send_request() end |
#create_workteam(params = {}) ⇒ Types::CreateWorkteamResponse
Creates a new work team for labeling your data. A work team is defined by one or more Amazon Cognito user pools. You must first create the user pools before you can create a work team.
You cannot create more than 25 work teams in an account and region.
2325 2326 2327 2328 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2325 def create_workteam(params = {}, = {}) req = build_request(:create_workteam, params) req.send_request() end |
#delete_algorithm(params = {}) ⇒ Struct
Removes the specified algorithm from your account.
2347 2348 2349 2350 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2347 def delete_algorithm(params = {}, = {}) req = build_request(:delete_algorithm, params) req.send_request() end |
#delete_code_repository(params = {}) ⇒ Struct
Deletes the specified Git repository from your account.
2369 2370 2371 2372 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2369 def delete_code_repository(params = {}, = {}) req = build_request(:delete_code_repository, params) req.send_request() end |
#delete_endpoint(params = {}) ⇒ Struct
Deletes an endpoint. Amazon SageMaker frees up all of the resources that were deployed when the endpoint was created.
Amazon SageMaker retires any custom KMS key grants associated with the endpoint, meaning you don’t need to use the [RevokeGrant] API call.
[1]: docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html
2400 2401 2402 2403 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2400 def delete_endpoint(params = {}, = {}) req = build_request(:delete_endpoint, params) req.send_request() end |
#delete_endpoint_config(params = {}) ⇒ Struct
Deletes an endpoint configuration. The ‘DeleteEndpointConfig` API deletes only the specified configuration. It does not delete endpoints created using the configuration.
2424 2425 2426 2427 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2424 def delete_endpoint_config(params = {}, = {}) req = build_request(:delete_endpoint_config, params) req.send_request() end |
#delete_model(params = {}) ⇒ Struct
Deletes a model. The ‘DeleteModel` API deletes only the model entry that was created in Amazon SageMaker when you called the
- CreateModel][1
-
API. It does not delete model artifacts, inference
code, or the IAM role that you specified when creating the model.
[1]: docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html
2453 2454 2455 2456 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2453 def delete_model(params = {}, = {}) req = build_request(:delete_model, params) req.send_request() end |
#delete_model_package(params = {}) ⇒ Struct
Deletes a model package.
A model package is used to create Amazon SageMaker models or list on AWS Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace to create models in Amazon SageMaker.
2480 2481 2482 2483 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2480 def delete_model_package(params = {}, = {}) req = build_request(:delete_model_package, params) req.send_request() end |
#delete_notebook_instance(params = {}) ⇒ Struct
Deletes an Amazon SageMaker notebook instance. Before you can delete a notebook instance, you must call the ‘StopNotebookInstance` API.
When you delete a notebook instance, you lose all of your data. Amazon SageMaker removes the ML compute instance, and deletes the ML storage volume and the network interface associated with the notebook instance.
2508 2509 2510 2511 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2508 def delete_notebook_instance(params = {}, = {}) req = build_request(:delete_notebook_instance, params) req.send_request() end |
#delete_notebook_instance_lifecycle_config(params = {}) ⇒ Struct
Deletes a notebook instance lifecycle configuration.
2530 2531 2532 2533 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2530 def delete_notebook_instance_lifecycle_config(params = {}, = {}) req = build_request(:delete_notebook_instance_lifecycle_config, params) req.send_request() end |
#delete_tags(params = {}) ⇒ Struct
Deletes the specified tags from an Amazon SageMaker resource.
To list a resource’s tags, use the ‘ListTags` API.
<note markdown=“1”> When you call this API to delete tags from a hyperparameter tuning job, the deleted tags are not removed from training jobs that the hyperparameter tuning job launched before you called this API.
</note>
2565 2566 2567 2568 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2565 def (params = {}, = {}) req = build_request(:delete_tags, params) req.send_request() end |
#delete_workteam(params = {}) ⇒ Types::DeleteWorkteamResponse
Deletes an existing work team. This operation can’t be undone.
2593 2594 2595 2596 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2593 def delete_workteam(params = {}, = {}) req = build_request(:delete_workteam, params) req.send_request() end |
#describe_algorithm(params = {}) ⇒ Types::DescribeAlgorithmOutput
Returns a description of the specified algorithm that is in your account.
2736 2737 2738 2739 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2736 def describe_algorithm(params = {}, = {}) req = build_request(:describe_algorithm, params) req.send_request() end |
#describe_code_repository(params = {}) ⇒ Types::DescribeCodeRepositoryOutput
Gets details about the specified Git repository.
2774 2775 2776 2777 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2774 def describe_code_repository(params = {}, = {}) req = build_request(:describe_code_repository, params) req.send_request() end |
#describe_compilation_job(params = {}) ⇒ Types::DescribeCompilationJobResponse
Returns information about a model compilation job.
To create a model compilation job, use CreateCompilationJob. To get information about multiple model compilation jobs, use ListCompilationJobs.
2833 2834 2835 2836 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2833 def describe_compilation_job(params = {}, = {}) req = build_request(:describe_compilation_job, params) req.send_request() end |
#describe_endpoint(params = {}) ⇒ Types::DescribeEndpointOutput
Returns the description of an endpoint.
2884 2885 2886 2887 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2884 def describe_endpoint(params = {}, = {}) req = build_request(:describe_endpoint, params) req.send_request() end |
#describe_endpoint_config(params = {}) ⇒ Types::DescribeEndpointConfigOutput
Returns the description of an endpoint configuration created using the ‘CreateEndpointConfig` API.
2927 2928 2929 2930 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 2927 def describe_endpoint_config(params = {}, = {}) req = build_request(:describe_endpoint_config, params) req.send_request() end |
#describe_hyper_parameter_tuning_job(params = {}) ⇒ Types::DescribeHyperParameterTuningJobResponse
Gets a description of a hyperparameter tuning job.
3065 3066 3067 3068 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3065 def describe_hyper_parameter_tuning_job(params = {}, = {}) req = build_request(:describe_hyper_parameter_tuning_job, params) req.send_request() end |
#describe_labeling_job(params = {}) ⇒ Types::DescribeLabelingJobResponse
Gets information about a labeling job.
3154 3155 3156 3157 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3154 def describe_labeling_job(params = {}, = {}) req = build_request(:describe_labeling_job, params) req.send_request() end |
#describe_model(params = {}) ⇒ Types::DescribeModelOutput
Describes a model that you created using the ‘CreateModel` API.
3210 3211 3212 3213 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3210 def describe_model(params = {}, = {}) req = build_request(:describe_model, params) req.send_request() end |
#describe_model_package(params = {}) ⇒ Types::DescribeModelPackageOutput
Returns a description of the specified model package, which is used to create Amazon SageMaker models or list them on AWS Marketplace.
To create models in Amazon SageMaker, buyers can subscribe to model packages listed on AWS Marketplace.
3301 3302 3303 3304 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3301 def describe_model_package(params = {}, = {}) req = build_request(:describe_model_package, params) req.send_request() end |
#describe_notebook_instance(params = {}) ⇒ Types::DescribeNotebookInstanceOutput
Returns information about a notebook instance.
3370 3371 3372 3373 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3370 def describe_notebook_instance(params = {}, = {}) req = build_request(:describe_notebook_instance, params) req.send_request() end |
#describe_notebook_instance_lifecycle_config(params = {}) ⇒ Types::DescribeNotebookInstanceLifecycleConfigOutput
Returns a description of a notebook instance lifecycle configuration.
For information about notebook instance lifestyle configurations, see [Step 2.1: (Optional) Customize a Notebook Instance].
[1]: docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html
3417 3418 3419 3420 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3417 def describe_notebook_instance_lifecycle_config(params = {}, = {}) req = build_request(:describe_notebook_instance_lifecycle_config, params) req.send_request() end |
#describe_subscribed_workteam(params = {}) ⇒ Types::DescribeSubscribedWorkteamResponse
Gets information about a work team provided by a vendor. It returns details about the subscription with a vendor in the AWS Marketplace.
3451 3452 3453 3454 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3451 def describe_subscribed_workteam(params = {}, = {}) req = build_request(:describe_subscribed_workteam, params) req.send_request() end |
#describe_training_job(params = {}) ⇒ Types::DescribeTrainingJobResponse
Returns information about a training job.
3556 3557 3558 3559 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3556 def describe_training_job(params = {}, = {}) req = build_request(:describe_training_job, params) req.send_request() end |
#describe_transform_job(params = {}) ⇒ Types::DescribeTransformJobResponse
Returns information about a transform job.
3624 3625 3626 3627 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3624 def describe_transform_job(params = {}, = {}) req = build_request(:describe_transform_job, params) req.send_request() end |
#describe_workteam(params = {}) ⇒ Types::DescribeWorkteamResponse
Gets information about a specific work team. You can see information such as the create date, the last updated date, membership information, and the work team’s Amazon Resource Name (ARN).
3665 3666 3667 3668 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3665 def describe_workteam(params = {}, = {}) req = build_request(:describe_workteam, params) req.send_request() end |
#get_search_suggestions(params = {}) ⇒ Types::GetSearchSuggestionsResponse
An auto-complete API for the search functionality in the Amazon SageMaker console. It returns suggestions of possible matches for the property name to use in ‘Search` queries. Provides suggestions for `HyperParameters`, `Tags`, and `Metrics`.
3706 3707 3708 3709 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3706 def get_search_suggestions(params = {}, = {}) req = build_request(:get_search_suggestions, params) req.send_request() end |
#list_algorithms(params = {}) ⇒ Types::ListAlgorithmsOutput
Lists the machine learning algorithms that have been created.
3771 3772 3773 3774 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3771 def list_algorithms(params = {}, = {}) req = build_request(:list_algorithms, params) req.send_request() end |
#list_code_repositories(params = {}) ⇒ Types::ListCodeRepositoriesOutput
Gets a list of the Git repositories in your account.
3847 3848 3849 3850 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3847 def list_code_repositories(params = {}, = {}) req = build_request(:list_code_repositories, params) req.send_request() end |
#list_compilation_jobs(params = {}) ⇒ Types::ListCompilationJobsResponse
Lists model compilation jobs that satisfy various filters.
To create a model compilation job, use CreateCompilationJob. To get information about a particular model compilation job you have created, use DescribeCompilationJob.
3934 3935 3936 3937 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3934 def list_compilation_jobs(params = {}, = {}) req = build_request(:list_compilation_jobs, params) req.send_request() end |
#list_endpoint_configs(params = {}) ⇒ Types::ListEndpointConfigsOutput
Lists endpoint configurations.
3996 3997 3998 3999 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 3996 def list_endpoint_configs(params = {}, = {}) req = build_request(:list_endpoint_configs, params) req.send_request() end |
#list_endpoints(params = {}) ⇒ Types::ListEndpointsOutput
Lists endpoints.
4074 4075 4076 4077 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4074 def list_endpoints(params = {}, = {}) req = build_request(:list_endpoints, params) req.send_request() end |
#list_hyper_parameter_tuning_jobs(params = {}) ⇒ Types::ListHyperParameterTuningJobsResponse
Gets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter tuning jobs launched in your account.
4165 4166 4167 4168 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4165 def list_hyper_parameter_tuning_jobs(params = {}, = {}) req = build_request(:list_hyper_parameter_tuning_jobs, params) req.send_request() end |
#list_labeling_jobs(params = {}) ⇒ Types::ListLabelingJobsResponse
Gets a list of labeling jobs.
4258 4259 4260 4261 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4258 def list_labeling_jobs(params = {}, = {}) req = build_request(:list_labeling_jobs, params) req.send_request() end |
#list_labeling_jobs_for_workteam(params = {}) ⇒ Types::ListLabelingJobsForWorkteamResponse
Gets a list of labeling jobs assigned to a specified work team.
4330 4331 4332 4333 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4330 def list_labeling_jobs_for_workteam(params = {}, = {}) req = build_request(:list_labeling_jobs_for_workteam, params) req.send_request() end |
#list_model_packages(params = {}) ⇒ Types::ListModelPackagesOutput
Lists the model packages that have been created.
4395 4396 4397 4398 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4395 def list_model_packages(params = {}, = {}) req = build_request(:list_model_packages, params) req.send_request() end |
#list_models(params = {}) ⇒ Types::ListModelsOutput
Lists models created with the [CreateModel] API.
[1]: docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html
4461 4462 4463 4464 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4461 def list_models(params = {}, = {}) req = build_request(:list_models, params) req.send_request() end |
#list_notebook_instance_lifecycle_configs(params = {}) ⇒ Types::ListNotebookInstanceLifecycleConfigsOutput
Lists notebook instance lifestyle configurations created with the CreateNotebookInstanceLifecycleConfig API.
4536 4537 4538 4539 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4536 def list_notebook_instance_lifecycle_configs(params = {}, = {}) req = build_request(:list_notebook_instance_lifecycle_configs, params) req.send_request() end |
#list_notebook_instances(params = {}) ⇒ Types::ListNotebookInstancesOutput
Returns a list of the Amazon SageMaker notebook instances in the requester’s account in an AWS Region.
4648 4649 4650 4651 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4648 def list_notebook_instances(params = {}, = {}) req = build_request(:list_notebook_instances, params) req.send_request() end |
#list_subscribed_workteams(params = {}) ⇒ Types::ListSubscribedWorkteamsResponse
Gets a list of the work teams that you are subscribed to in the AWS Marketplace. The list may be empty if no work team satisfies the filter specified in the ‘NameContains` parameter.
4697 4698 4699 4700 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4697 def list_subscribed_workteams(params = {}, = {}) req = build_request(:list_subscribed_workteams, params) req.send_request() end |
#list_tags(params = {}) ⇒ Types::ListTagsOutput
Returns the tags for the specified Amazon SageMaker resource.
4740 4741 4742 4743 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4740 def (params = {}, = {}) req = build_request(:list_tags, params) req.send_request() end |
#list_training_jobs(params = {}) ⇒ Types::ListTrainingJobsResponse
Lists training jobs.
4819 4820 4821 4822 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4819 def list_training_jobs(params = {}, = {}) req = build_request(:list_training_jobs, params) req.send_request() end |
#list_training_jobs_for_hyper_parameter_tuning_job(params = {}) ⇒ Types::ListTrainingJobsForHyperParameterTuningJobResponse
Gets a list of TrainingJobSummary objects that describe the training jobs that a hyperparameter tuning job launched.
4891 4892 4893 4894 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4891 def list_training_jobs_for_hyper_parameter_tuning_job(params = {}, = {}) req = build_request(:list_training_jobs_for_hyper_parameter_tuning_job, params) req.send_request() end |
#list_transform_jobs(params = {}) ⇒ Types::ListTransformJobsResponse
Lists transform jobs.
4972 4973 4974 4975 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 4972 def list_transform_jobs(params = {}, = {}) req = build_request(:list_transform_jobs, params) req.send_request() end |
#list_workteams(params = {}) ⇒ Types::ListWorkteamsResponse
Gets a list of work teams that you have defined in a region. The list may be empty if no work team satisfies the filter specified in the ‘NameContains` parameter.
5036 5037 5038 5039 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5036 def list_workteams(params = {}, = {}) req = build_request(:list_workteams, params) req.send_request() end |
#render_ui_template(params = {}) ⇒ Types::RenderUiTemplateResponse
Renders the UI template so that you can preview the worker’s experience.
5082 5083 5084 5085 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5082 def render_ui_template(params = {}, = {}) req = build_request(:render_ui_template, params) req.send_request() end |
#search(params = {}) ⇒ Types::SearchResponse
Finds Amazon SageMaker resources that match a search query. Matching resource objects are returned as a list of ‘SearchResult` objects in the response. You can sort the search results by any resource property in a ascending or descending order.
You can query against the following value types: numerical, text, Booleans, and timestamps.
5233 5234 5235 5236 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5233 def search(params = {}, = {}) req = build_request(:search, params) req.send_request() end |
#start_notebook_instance(params = {}) ⇒ Struct
Launches an ML compute instance with the latest version of the libraries and attaches your ML storage volume. After configuring the notebook instance, Amazon SageMaker sets the notebook instance status to ‘InService`. A notebook instance’s status must be ‘InService` before you can connect to your Jupyter notebook.
5259 5260 5261 5262 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5259 def start_notebook_instance(params = {}, = {}) req = build_request(:start_notebook_instance, params) req.send_request() end |
#stop_compilation_job(params = {}) ⇒ Struct
Stops a model compilation job.
To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This gracefully shuts the job down. If the job hasn’t stopped, it sends the SIGKILL signal.
When it receives a ‘StopCompilationJob` request, Amazon SageMaker changes the CompilationJobSummary$CompilationJobStatus of the job to `Stopping`. After Amazon SageMaker stops the job, it sets the CompilationJobSummary$CompilationJobStatus to `Stopped`.
5290 5291 5292 5293 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5290 def stop_compilation_job(params = {}, = {}) req = build_request(:stop_compilation_job, params) req.send_request() end |
#stop_hyper_parameter_tuning_job(params = {}) ⇒ Struct
Stops a running hyperparameter tuning job and all running training jobs that the tuning job launched.
All model artifacts output from the training jobs are stored in Amazon Simple Storage Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs are still available in CloudWatch. After the tuning job moves to the ‘Stopped` state, it releases all reserved resources for the tuning job.
5319 5320 5321 5322 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5319 def stop_hyper_parameter_tuning_job(params = {}, = {}) req = build_request(:stop_hyper_parameter_tuning_job, params) req.send_request() end |
#stop_labeling_job(params = {}) ⇒ Struct
Stops a running labeling job. A job that is stopped cannot be restarted. Any results obtained before the job is stopped are placed in the Amazon S3 output bucket.
5343 5344 5345 5346 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5343 def stop_labeling_job(params = {}, = {}) req = build_request(:stop_labeling_job, params) req.send_request() end |
#stop_notebook_instance(params = {}) ⇒ Struct
Terminates the ML compute instance. Before terminating the instance, Amazon SageMaker disconnects the ML storage volume from it. Amazon SageMaker preserves the ML storage volume.
To access data on the ML storage volume for a notebook instance that has been terminated, call the ‘StartNotebookInstance` API. `StartNotebookInstance` launches another ML compute instance, configures it, and attaches the preserved ML storage volume so you can continue your work.
5373 5374 5375 5376 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5373 def stop_notebook_instance(params = {}, = {}) req = build_request(:stop_notebook_instance, params) req.send_request() end |
#stop_training_job(params = {}) ⇒ Struct
Stops a training job. To stop a job, Amazon SageMaker sends the algorithm the ‘SIGTERM` signal, which delays job termination for 120 seconds. Algorithms might use this 120-second window to save the model artifacts, so the results of the training is not lost.
When it receives a ‘StopTrainingJob` request, Amazon SageMaker changes the status of the job to `Stopping`. After Amazon SageMaker stops the job, it sets the status to `Stopped`.
5402 5403 5404 5405 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5402 def stop_training_job(params = {}, = {}) req = build_request(:stop_training_job, params) req.send_request() end |
#stop_transform_job(params = {}) ⇒ Struct
Stops a transform job.
When Amazon SageMaker receives a ‘StopTransformJob` request, the status of the job changes to `Stopping`. After Amazon SageMaker stops the job, the status is set to `Stopped`. When you stop a transform job before it is completed, Amazon SageMaker doesn’t store the job’s output in Amazon S3.
5430 5431 5432 5433 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5430 def stop_transform_job(params = {}, = {}) req = build_request(:stop_transform_job, params) req.send_request() end |
#update_code_repository(params = {}) ⇒ Types::UpdateCodeRepositoryOutput
Updates the specified Git repository with the specified values.
5470 5471 5472 5473 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5470 def update_code_repository(params = {}, = {}) req = build_request(:update_code_repository, params) req.send_request() end |
#update_endpoint(params = {}) ⇒ Types::UpdateEndpointOutput
Deploys the new ‘EndpointConfig` specified in the request, switches to using newly created endpoint, and then deletes resources provisioned for the endpoint using the previous `EndpointConfig` (there is no availability loss).
When Amazon SageMaker receives the request, it sets the endpoint status to ‘Updating`. After updating the endpoint, it sets the status to `InService`. To check the status of an endpoint, use the
- DescribeEndpoint][1
-
API.
<note markdown=“1”> You cannot update an endpoint with the current ‘EndpointConfig`. To update an endpoint, you must create a new `EndpointConfig`.
</note>
[1]: docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html
5519 5520 5521 5522 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5519 def update_endpoint(params = {}, = {}) req = build_request(:update_endpoint, params) req.send_request() end |
#update_endpoint_weights_and_capacities(params = {}) ⇒ Types::UpdateEndpointWeightsAndCapacitiesOutput
Updates variant weight of one or more variants associated with an existing endpoint, or capacity of one variant associated with an existing endpoint. When it receives the request, Amazon SageMaker sets the endpoint status to ‘Updating`. After updating the endpoint, it sets the status to `InService`. To check the status of an endpoint, use the [DescribeEndpoint] API.
[1]: docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html
5566 5567 5568 5569 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5566 def update_endpoint_weights_and_capacities(params = {}, = {}) req = build_request(:update_endpoint_weights_and_capacities, params) req.send_request() end |
#update_notebook_instance(params = {}) ⇒ Struct
Updates a notebook instance. NotebookInstance updates include upgrading or downgrading the ML compute instance used for your notebook instance to accommodate changes in your workload requirements. You can also update the VPC security groups.
5697 5698 5699 5700 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5697 def update_notebook_instance(params = {}, = {}) req = build_request(:update_notebook_instance, params) req.send_request() end |
#update_notebook_instance_lifecycle_config(params = {}) ⇒ Struct
Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig API.
5738 5739 5740 5741 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5738 def update_notebook_instance_lifecycle_config(params = {}, = {}) req = build_request(:update_notebook_instance_lifecycle_config, params) req.send_request() end |
#update_workteam(params = {}) ⇒ Types::UpdateWorkteamResponse
Updates an existing work team with new member definitions or description.
5795 5796 5797 5798 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5795 def update_workteam(params = {}, = {}) req = build_request(:update_workteam, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.waiter_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | ———————————- | —————————– | ——– | ————- | | endpoint_deleted | #describe_endpoint | 30 | 60 | | endpoint_in_service | #describe_endpoint | 30 | 120 | | notebook_instance_deleted | #describe_notebook_instance | 30 | 60 | | notebook_instance_in_service | #describe_notebook_instance | 30 | 60 | | notebook_instance_stopped | #describe_notebook_instance | 30 | 60 | | training_job_completed_or_stopped | #describe_training_job | 120 | 180 | | transform_job_completed_or_stopped | #describe_transform_job | 60 | 60 |
5911 5912 5913 5914 5915 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5911 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5919 5920 5921 |
# File 'lib/aws-sdk-sagemaker/client.rb', line 5919 def waiter_names waiters.keys end |