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.
471 472 473 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 471 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.
585 586 587 588 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 585 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.
750 751 752 753 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 750 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).
841 842 843 844 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 841 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).
929 930 931 932 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 929 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.
996 997 998 999 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 996 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.
1058 1059 1060 1061 |
# File 'gems/aws-sdk-sagemakertrainingsessionruntime/lib/aws-sdk-sagemakertrainingsessionruntime/client.rb', line 1058 def sample_training_session_with_response_stream(params = {}, = {}, &block) req = build_request(:sample_training_session_with_response_stream, params) req.send_request(, &block) end |