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.
479 480 481 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 479 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.
593 594 595 596 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 593 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.
758 759 760 761 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 758 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).
849 850 851 852 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 849 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).
937 938 939 940 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 937 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.
1004 1005 1006 1007 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 1004 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.
1066 1067 1068 1069 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 1066 def sample_training_session_with_response_stream(params = {}, = {}, &block) req = build_request(:sample_training_session_with_response_stream, params) req.send_request(, &block) end |