Class: Aws::SageMakerTrainingSessionRuntime::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SageMakerTrainingSessionRuntime::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb
Overview
An API client for SageMakerTrainingSessionRuntime. To construct a client, you need to configure a :region and :credentials.
client = Aws::SageMakerTrainingSessionRuntime::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#execute_sampling_operation(params = {}) ⇒ Types::ExecuteSamplingOperationOutput
Submits an asynchronous sampling operation to generate text or compute log-probabilities from the model associated with the specified training session.
-
#execute_training_operation(params = {}) ⇒ Types::ExecuteTrainingOperationOutput
Submits an asynchronous training operation to the specified training session.
-
#get_sampling_operation_result(params = {}) ⇒ Types::GetSamplingOperationResultOutput
Retrieves the current status and result of a previously submitted sampling operation.
-
#get_training_operation_result(params = {}) ⇒ Types::GetTrainingOperationResultOutput
Retrieves the current status and result of a previously submitted training operation.
-
#sample_training_session(params = {}) ⇒ Types::SampleTrainingSessionOutput
Sends an inference request to the model associated with the specified training session and returns the response synchronously.
-
#sample_training_session_with_response_stream(params = {}) ⇒ Types::SampleTrainingSessionWithResponseStreamOutput
Streams inference responses from the model associated with the specified training session.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 478 def initialize(*args) super end |
Instance Method Details
#execute_sampling_operation(params = {}) ⇒ Types::ExecuteSamplingOperationOutput
Submits an asynchronous sampling operation to generate text or compute
log-probabilities from the model associated with the specified
training session. The session must be in Running or Blocked state.
Use GetSamplingOperationResult to poll for the result.
592 593 594 595 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 592 def execute_sampling_operation(params = {}, = {}) req = build_request(:execute_sampling_operation, params) req.send_request() end |
#execute_training_operation(params = {}) ⇒ Types::ExecuteTrainingOperationOutput
Submits an asynchronous training operation to the specified training
session. The service executes operations in sequence number order. The
session must be in Running or Blocked state. Use
GetTrainingOperationResult to poll for the result. Supported
operation types: forward, forwardBackward, optimizerStep,
saveWeights, saveState, and loadState.
757 758 759 760 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 757 def execute_training_operation(params = {}, = {}) req = build_request(:execute_training_operation, params) req.send_request() end |
#get_sampling_operation_result(params = {}) ⇒ Types::GetSamplingOperationResultOutput
Retrieves the current status and result of a previously submitted sampling operation. Poll this operation until the status reaches a terminal state (Completed or Failed).
848 849 850 851 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 848 def get_sampling_operation_result(params = {}, = {}) req = build_request(:get_sampling_operation_result, params) req.send_request() end |
#get_training_operation_result(params = {}) ⇒ Types::GetTrainingOperationResultOutput
Retrieves the current status and result of a previously submitted training operation. Poll this operation until the status reaches a terminal state (Completed, Failed, or Skipped).
936 937 938 939 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 936 def get_training_operation_result(params = {}, = {}) req = build_request(:get_training_operation_result, params) req.send_request() end |
#sample_training_session(params = {}) ⇒ Types::SampleTrainingSessionOutput
Sends an inference request to the model associated with the specified training session and returns the response synchronously. The service passes the request and response bodies to and from the model without modification.
1003 1004 1005 1006 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 1003 def sample_training_session(params = {}, = {}) req = build_request(:sample_training_session, params) req.send_request() end |
#sample_training_session_with_response_stream(params = {}) ⇒ Types::SampleTrainingSessionWithResponseStreamOutput
Streams inference responses from the model associated with the specified training session. Use this operation for real-time token-by-token generation. The service passes the request body to the model without modification.
1065 1066 1067 1068 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 1065 def sample_training_session_with_response_stream(params = {}, = {}, &block) req = build_request(:sample_training_session_with_response_stream, params) req.send_request(, &block) end |