Class: Aws::SagemakerJobRuntime::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SagemakerJobRuntime::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-sagemakerjobruntime/client.rb
Overview
An API client for SagemakerJobRuntime. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::SagemakerJobRuntime::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#complete_rollout(params = {}) ⇒ Struct
Marks a rollout as complete, indicating that no further turns will be appended to the trajectory.
-
#sample(params = {}) ⇒ Types::SampleResponse
Sends an inference request to the model during a job execution.
-
#sample_with_response_stream(params = {}) ⇒ Types::SampleWithResponseStreamResponse
Sends a streaming inference request to the model during a job execution.
-
#update_reward(params = {}) ⇒ Struct
Updates the reward values for a trajectory and transitions it to reward-received status, signaling that it is eligible for processing.
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.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
471 472 473 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 471 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.
734 735 736 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 734 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.
737 738 739 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 737 def errors_module Errors end |
Instance Method Details
#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.
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 707 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::SagemakerJobRuntime') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-sagemakerjobruntime' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#complete_rollout(params = {}) ⇒ Struct
Marks a rollout as complete, indicating that no further turns will be appended to the trajectory. After calling this operation, the trajectory is sealed and eligible for reward submission via the UpdateReward operation.
530 531 532 533 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 530 def complete_rollout(params = {}, = {}) req = build_request(:complete_rollout, params) req.send_request() end |
#sample(params = {}) ⇒ Types::SampleResponse
Sends an inference request to the model during a job execution. The request and response bodies are forwarded to and from the model without modification. Each turn (prompt and response) is captured for later use.
584 585 586 587 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 584 def sample(params = {}, = {}) req = build_request(:sample, params) req.send_request() end |
#sample_with_response_stream(params = {}) ⇒ Types::SampleWithResponseStreamResponse
Sends a streaming inference request to the model during a job execution. Returns the response as a stream of payload chunks. Each turn is captured for later use.
637 638 639 640 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 637 def sample_with_response_stream(params = {}, = {}, &block) req = build_request(:sample_with_response_stream, params) req.send_request(, &block) end |
#update_reward(params = {}) ⇒ Struct
Updates the reward values for a trajectory and transitions it to reward-received status, signaling that it is eligible for processing. Call this operation after CompleteRollout to provide the computed reward scores.
698 699 700 701 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 698 def update_reward(params = {}, = {}) req = build_request(:update_reward, params) req.send_request() 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.
727 728 729 |
# File 'lib/aws-sdk-sagemakerjobruntime/client.rb', line 727 def waiter_names [] end |