@aws-sdk/client-sagemakertrainingsessionruntime 0.0.0-stage → 3.1151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +222 -2
- package/dist-cjs/index.js +913 -0
- package/dist-es/SageMakerTrainingSessionRuntime.js +19 -0
- package/dist-es/SageMakerTrainingSessionRuntimeClient.js +47 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commandBuilder.js +6 -0
- package/dist-es/commands/ExecuteSamplingOperationCommand.js +4 -0
- package/dist-es/commands/ExecuteTrainingOperationCommand.js +4 -0
- package/dist-es/commands/GetSamplingOperationResultCommand.js +4 -0
- package/dist-es/commands/GetTrainingOperationResultCommand.js +4 -0
- package/dist-es/commands/SampleTrainingSessionCommand.js +4 -0
- package/dist-es/commands/SampleTrainingSessionWithResponseStreamCommand.js +4 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/bdd.js +29 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +9 -0
- package/dist-es/models/SageMakerTrainingSessionRuntimeServiceException.js +9 -0
- package/dist-es/models/enums.js +20 -0
- package/dist-es/models/errors.js +66 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/runtimeConfig.browser.js +29 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +9 -0
- package/dist-es/runtimeConfig.shared.js +41 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +454 -0
- package/dist-types/SageMakerTrainingSessionRuntime.d.ts +58 -0
- package/dist-types/SageMakerTrainingSessionRuntimeClient.d.ts +197 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commandBuilder.d.ts +18 -0
- package/dist-types/commands/ExecuteSamplingOperationCommand.d.ts +169 -0
- package/dist-types/commands/ExecuteTrainingOperationCommand.d.ts +206 -0
- package/dist-types/commands/GetSamplingOperationResultCommand.d.ts +159 -0
- package/dist-types/commands/GetTrainingOperationResultCommand.d.ts +169 -0
- package/dist-types/commands/SampleTrainingSessionCommand.d.ts +123 -0
- package/dist-types/commands/SampleTrainingSessionWithResponseStreamCommand.d.ts +124 -0
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +17 -0
- package/dist-types/models/SageMakerTrainingSessionRuntimeServiceException.d.ts +15 -0
- package/dist-types/models/enums.d.ts +52 -0
- package/dist-types/models/errors.d.ts +67 -0
- package/dist-types/models/models_0.d.ts +1069 -0
- package/dist-types/runtimeConfig.browser.d.ts +58 -0
- package/dist-types/runtimeConfig.d.ts +58 -0
- package/dist-types/runtimeConfig.native.d.ts +57 -0
- package/dist-types/runtimeConfig.shared.d.ts +29 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +64 -0
- package/dist-types/ts3.4/SageMakerTrainingSessionRuntime.d.ts +115 -0
- package/dist-types/ts3.4/SageMakerTrainingSessionRuntimeClient.d.ts +143 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +27 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
- package/dist-types/ts3.4/commandBuilder.d.ts +40 -0
- package/dist-types/ts3.4/commands/ExecuteSamplingOperationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ExecuteTrainingOperationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetSamplingOperationResultCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetTrainingOperationResultCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/SampleTrainingSessionCommand.d.ts +52 -0
- package/dist-types/ts3.4/commands/SampleTrainingSessionWithResponseStreamCommand.d.ts +59 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
- package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +10 -0
- package/dist-types/ts3.4/index.d.ts +12 -0
- package/dist-types/ts3.4/models/SageMakerTrainingSessionRuntimeServiceException.d.ts +10 -0
- package/dist-types/ts3.4/models/enums.d.ts +24 -0
- package/dist-types/ts3.4/models/errors.d.ts +32 -0
- package/dist-types/ts3.4/models/models_0.d.ts +417 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +94 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +98 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +32 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +64 -0
- package/package.json +67 -4
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { type HostHeaderInputConfig, type HostHeaderResolvedConfig, type UserAgentInputConfig, type UserAgentResolvedConfig } from "@aws-sdk/core/client";
|
|
2
|
+
import { type DefaultsMode as __DefaultsMode, type SmithyConfiguration as __SmithyConfiguration, type SmithyResolvedConfiguration as __SmithyResolvedConfiguration, Client as __Client } from "@smithy/core/client";
|
|
3
|
+
import { type RegionInputConfig, type RegionResolvedConfig } from "@smithy/core/config";
|
|
4
|
+
import { type EndpointInputConfig, type EndpointResolvedConfig } from "@smithy/core/endpoints";
|
|
5
|
+
import { type HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/core/protocols";
|
|
6
|
+
import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/core/retry";
|
|
7
|
+
import type { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, SdkStreamMixinInjector as __SdkStreamMixinInjector, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
8
|
+
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
9
|
+
import type { ExecuteSamplingOperationCommandInput, ExecuteSamplingOperationCommandOutput } from "./commands/ExecuteSamplingOperationCommand";
|
|
10
|
+
import type { ExecuteTrainingOperationCommandInput, ExecuteTrainingOperationCommandOutput } from "./commands/ExecuteTrainingOperationCommand";
|
|
11
|
+
import type { GetSamplingOperationResultCommandInput, GetSamplingOperationResultCommandOutput } from "./commands/GetSamplingOperationResultCommand";
|
|
12
|
+
import type { GetTrainingOperationResultCommandInput, GetTrainingOperationResultCommandOutput } from "./commands/GetTrainingOperationResultCommand";
|
|
13
|
+
import type { SampleTrainingSessionCommandInput, SampleTrainingSessionCommandOutput } from "./commands/SampleTrainingSessionCommand";
|
|
14
|
+
import type { SampleTrainingSessionWithResponseStreamCommandInput, SampleTrainingSessionWithResponseStreamCommandOutput } from "./commands/SampleTrainingSessionWithResponseStreamCommand";
|
|
15
|
+
import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
|
|
16
|
+
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
17
|
+
export { __Client };
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type ServiceInputTypes = ExecuteSamplingOperationCommandInput | ExecuteTrainingOperationCommandInput | GetSamplingOperationResultCommandInput | GetTrainingOperationResultCommandInput | SampleTrainingSessionCommandInput | SampleTrainingSessionWithResponseStreamCommandInput;
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export type ServiceOutputTypes = ExecuteSamplingOperationCommandOutput | ExecuteTrainingOperationCommandOutput | GetSamplingOperationResultCommandOutput | GetTrainingOperationResultCommandOutput | SampleTrainingSessionCommandOutput | SampleTrainingSessionWithResponseStreamCommandOutput;
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
30
|
+
/**
|
|
31
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
32
|
+
*/
|
|
33
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
34
|
+
/**
|
|
35
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
36
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
40
|
+
/**
|
|
41
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
urlParser?: __UrlParser;
|
|
45
|
+
/**
|
|
46
|
+
* A function that can calculate the length of a request body.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
50
|
+
/**
|
|
51
|
+
* A function that converts a stream into an array of bytes.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
streamCollector?: __StreamCollector;
|
|
55
|
+
/**
|
|
56
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
base64Decoder?: __Decoder;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
base64Encoder?: __Encoder;
|
|
65
|
+
/**
|
|
66
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
utf8Decoder?: __Decoder;
|
|
70
|
+
/**
|
|
71
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
utf8Encoder?: __Encoder;
|
|
75
|
+
/**
|
|
76
|
+
* The runtime environment.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
runtime?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
82
|
+
* trait of an operation.
|
|
83
|
+
*/
|
|
84
|
+
disableHostPrefix?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Unique service identifier.
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
serviceId?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
92
|
+
*/
|
|
93
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* Enables FIPS compatible endpoints.
|
|
96
|
+
*/
|
|
97
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* The AWS region to which this client will send requests
|
|
100
|
+
*/
|
|
101
|
+
region?: string | __Provider<string>;
|
|
102
|
+
/**
|
|
103
|
+
* Setting a client profile is similar to setting a value for the
|
|
104
|
+
* AWS_PROFILE environment variable. Setting a profile on a client
|
|
105
|
+
* in code only affects the single client instance, unlike AWS_PROFILE.
|
|
106
|
+
*
|
|
107
|
+
* When set, and only for environments where an AWS configuration
|
|
108
|
+
* file exists, fields configurable by this file will be retrieved
|
|
109
|
+
* from the specified profile within that file.
|
|
110
|
+
* Conflicting code configuration and environment variables will
|
|
111
|
+
* still have higher priority.
|
|
112
|
+
*
|
|
113
|
+
* For client credential resolution that involves checking the AWS
|
|
114
|
+
* configuration file, the client's profile (this value) will be
|
|
115
|
+
* used unless a different profile is set in the credential
|
|
116
|
+
* provider options.
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
profile?: string;
|
|
120
|
+
/**
|
|
121
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
defaultUserAgentProvider?: __Provider<__UserAgent>;
|
|
125
|
+
/**
|
|
126
|
+
* Default credentials provider; Not available in browser runtime.
|
|
127
|
+
* @deprecated
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
131
|
+
/**
|
|
132
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
133
|
+
*/
|
|
134
|
+
maxAttempts?: number | __Provider<number>;
|
|
135
|
+
/**
|
|
136
|
+
* Specifies which retry algorithm to use.
|
|
137
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
retryMode?: string | __Provider<string>;
|
|
141
|
+
/**
|
|
142
|
+
* Optional logger for logging debug/info/warn/error.
|
|
143
|
+
*/
|
|
144
|
+
logger?: __Logger;
|
|
145
|
+
/**
|
|
146
|
+
* Optional extensions
|
|
147
|
+
*/
|
|
148
|
+
extensions?: RuntimeExtension[];
|
|
149
|
+
/**
|
|
150
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
151
|
+
*/
|
|
152
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
153
|
+
/**
|
|
154
|
+
* The internal function that inject utilities to runtime-specific stream to help users consume the data
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
sdkStreamMixin?: __SdkStreamMixinInjector;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
export type SageMakerTrainingSessionRuntimeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
163
|
+
/**
|
|
164
|
+
* @public
|
|
165
|
+
*
|
|
166
|
+
* The configuration interface of SageMakerTrainingSessionRuntimeClient class constructor that set the region, credentials and other options.
|
|
167
|
+
*/
|
|
168
|
+
export interface SageMakerTrainingSessionRuntimeClientConfig extends SageMakerTrainingSessionRuntimeClientConfigType {
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @public
|
|
172
|
+
*/
|
|
173
|
+
export type SageMakerTrainingSessionRuntimeClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
174
|
+
/**
|
|
175
|
+
* @public
|
|
176
|
+
*
|
|
177
|
+
* The resolved configuration interface of SageMakerTrainingSessionRuntimeClient class. This is resolved and normalized from the {@link SageMakerTrainingSessionRuntimeClientConfig | constructor configuration interface}.
|
|
178
|
+
*/
|
|
179
|
+
export interface SageMakerTrainingSessionRuntimeClientResolvedConfig extends SageMakerTrainingSessionRuntimeClientResolvedConfigType {
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* <p>Amazon SageMaker Training Session Runtime provides APIs for executing training operations and sampling operations against a running training session. Use these APIs to submit asynchronous training steps (such as forward-backward passes, optimizer steps, and checkpoint saves) and to generate text samples from the model being trained.</p>
|
|
183
|
+
* @public
|
|
184
|
+
*/
|
|
185
|
+
export declare class SageMakerTrainingSessionRuntimeClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SageMakerTrainingSessionRuntimeClientResolvedConfig> {
|
|
186
|
+
/**
|
|
187
|
+
* The resolved configuration of SageMakerTrainingSessionRuntimeClient class. This is resolved and normalized from the {@link SageMakerTrainingSessionRuntimeClientConfig | constructor configuration interface}.
|
|
188
|
+
*/
|
|
189
|
+
readonly config: SageMakerTrainingSessionRuntimeClientResolvedConfig;
|
|
190
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<SageMakerTrainingSessionRuntimeClientConfig>);
|
|
191
|
+
/**
|
|
192
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
193
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
194
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
195
|
+
*/
|
|
196
|
+
destroy(): void;
|
|
197
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import type { SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
|
+
import type { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
|
|
3
|
+
import { type SageMakerTrainingSessionRuntimeClientResolvedConfig } from "../SageMakerTrainingSessionRuntimeClient";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface SageMakerTrainingSessionRuntimeHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface SageMakerTrainingSessionRuntimeHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<SageMakerTrainingSessionRuntimeClientResolvedConfig, HandlerExecutionContext, SageMakerTrainingSessionRuntimeHttpAuthSchemeParameters, object> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultSageMakerTrainingSessionRuntimeHttpAuthSchemeParametersProvider: (config: SageMakerTrainingSessionRuntimeClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<SageMakerTrainingSessionRuntimeHttpAuthSchemeParameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider extends HttpAuthSchemeProvider<SageMakerTrainingSessionRuntimeHttpAuthSchemeParameters> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultSageMakerTrainingSessionRuntimeHttpAuthSchemeProvider: SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider;
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
|
|
32
|
+
/**
|
|
33
|
+
* A comma-separated list of case-sensitive auth scheme names.
|
|
34
|
+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
35
|
+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
authSchemePreference?: string[] | Provider<string[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
44
|
+
/**
|
|
45
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
httpAuthSchemeProvider?: SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
|
|
54
|
+
/**
|
|
55
|
+
* A comma-separated list of case-sensitive auth scheme names.
|
|
56
|
+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
57
|
+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
readonly authSchemePreference: Provider<string[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
66
|
+
/**
|
|
67
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
readonly httpAuthSchemeProvider: SageMakerTrainingSessionRuntimeHttpAuthSchemeProvider;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EndpointParameterInstructions } from "@smithy/types";
|
|
2
|
+
import type { SageMakerTrainingSessionRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "./SageMakerTrainingSessionRuntimeClient";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const command: <I extends ServiceInputTypes, O extends ServiceOutputTypes>(added: EndpointParameterInstructions, plugins: (CommandCtor: any, clientStack: any, config: any, options: any) => import("@smithy/types").Pluggable<any, any>[], op: string, $: import("@smithy/types").StaticOperationSchema, smithyContext?: Record<string, unknown>) => {
|
|
7
|
+
new (input: I): import("@smithy/core/client").CommandImpl<I, O, SageMakerTrainingSessionRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
8
|
+
new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, SageMakerTrainingSessionRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
9
|
+
getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const _ep0: EndpointParameterInstructions;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const _mw0: (Command: any, cs: any, config: any, o: any) => never[];
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
2
|
+
import type { ExecuteSamplingOperationInput, ExecuteSamplingOperationOutput } from "../models/models_0";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type { __MetadataBearer };
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*
|
|
10
|
+
* The input for {@link ExecuteSamplingOperationCommand}.
|
|
11
|
+
*/
|
|
12
|
+
export interface ExecuteSamplingOperationCommandInput extends ExecuteSamplingOperationInput {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*
|
|
17
|
+
* The output of {@link ExecuteSamplingOperationCommand}.
|
|
18
|
+
*/
|
|
19
|
+
export interface ExecuteSamplingOperationCommandOutput extends ExecuteSamplingOperationOutput, __MetadataBearer {
|
|
20
|
+
}
|
|
21
|
+
declare const ExecuteSamplingOperationCommand_base: {
|
|
22
|
+
new (input: ExecuteSamplingOperationCommandInput): import("@smithy/core/client").CommandImpl<ExecuteSamplingOperationCommandInput, ExecuteSamplingOperationCommandOutput, import("..").SageMakerTrainingSessionRuntimeClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
23
|
+
new (input: ExecuteSamplingOperationCommandInput): import("@smithy/core/client").CommandImpl<ExecuteSamplingOperationCommandInput, ExecuteSamplingOperationCommandOutput, import("..").SageMakerTrainingSessionRuntimeClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
24
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* <p>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 <code>Running</code> or <code>Blocked</code> state. Use <code>GetSamplingOperationResult</code> to poll for the result.</p>
|
|
28
|
+
* @example
|
|
29
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
30
|
+
* ```javascript
|
|
31
|
+
* import { SageMakerTrainingSessionRuntimeClient, ExecuteSamplingOperationCommand } from "@aws-sdk/client-sagemakertrainingsessionruntime"; // ES Modules import
|
|
32
|
+
* // const { SageMakerTrainingSessionRuntimeClient, ExecuteSamplingOperationCommand } = require("@aws-sdk/client-sagemakertrainingsessionruntime"); // CommonJS import
|
|
33
|
+
* // import type { SageMakerTrainingSessionRuntimeClientConfig } from "@aws-sdk/client-sagemakertrainingsessionruntime";
|
|
34
|
+
* const config = {}; // type is SageMakerTrainingSessionRuntimeClientConfig
|
|
35
|
+
* const client = new SageMakerTrainingSessionRuntimeClient(config);
|
|
36
|
+
* const input = { // ExecuteSamplingOperationInput
|
|
37
|
+
* trainingSessionName: "STRING_VALUE", // required
|
|
38
|
+
* operationConfig: { // SampleOperationConfig Union: only one key present
|
|
39
|
+
* sample: { // SampleConfig
|
|
40
|
+
* prompt: { // ModelInput
|
|
41
|
+
* chunks: [ // EncodedTextChunkList // required
|
|
42
|
+
* { // EncodedTextChunk
|
|
43
|
+
* tokens: [ // IntegerList // required
|
|
44
|
+
* Number("int"),
|
|
45
|
+
* ],
|
|
46
|
+
* type: "encoded_text", // required
|
|
47
|
+
* },
|
|
48
|
+
* ],
|
|
49
|
+
* },
|
|
50
|
+
* numSamples: Number("int"), // required
|
|
51
|
+
* samplingParams: { // SamplingParams
|
|
52
|
+
* maxTokens: Number("int"), // required
|
|
53
|
+
* temperature: Number("double"),
|
|
54
|
+
* topK: Number("int"),
|
|
55
|
+
* topP: Number("double"),
|
|
56
|
+
* seed: Number("int"),
|
|
57
|
+
* stop: [ // StopSequenceList
|
|
58
|
+
* "STRING_VALUE",
|
|
59
|
+
* ],
|
|
60
|
+
* },
|
|
61
|
+
* includePromptLogprobs: true || false,
|
|
62
|
+
* topkPromptLogprobs: Number("int"),
|
|
63
|
+
* modelPackageArn: "STRING_VALUE",
|
|
64
|
+
* },
|
|
65
|
+
* computeLogprobs: { // ComputeLogprobsConfig
|
|
66
|
+
* prompt: {
|
|
67
|
+
* chunks: [ // required
|
|
68
|
+
* {
|
|
69
|
+
* tokens: [ // required
|
|
70
|
+
* Number("int"),
|
|
71
|
+
* ],
|
|
72
|
+
* type: "encoded_text", // required
|
|
73
|
+
* },
|
|
74
|
+
* ],
|
|
75
|
+
* },
|
|
76
|
+
* modelPackageArn: "STRING_VALUE",
|
|
77
|
+
* },
|
|
78
|
+
* loadWeightsForSampling: { // LoadWeightsForSamplingConfig
|
|
79
|
+
* modelPackageArn: "STRING_VALUE", // required
|
|
80
|
+
* },
|
|
81
|
+
* },
|
|
82
|
+
* };
|
|
83
|
+
* const command = new ExecuteSamplingOperationCommand(input);
|
|
84
|
+
* const response = await client.send(command);
|
|
85
|
+
* // { // ExecuteSamplingOperationOutput
|
|
86
|
+
* // operationId: "STRING_VALUE", // required
|
|
87
|
+
* // };
|
|
88
|
+
*
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @param ExecuteSamplingOperationCommandInput - {@link ExecuteSamplingOperationCommandInput}
|
|
92
|
+
* @returns {@link ExecuteSamplingOperationCommandOutput}
|
|
93
|
+
* @see {@link ExecuteSamplingOperationCommandInput} for command's `input` shape.
|
|
94
|
+
* @see {@link ExecuteSamplingOperationCommandOutput} for command's `response` shape.
|
|
95
|
+
* @see {@link SageMakerTrainingSessionRuntimeClientResolvedConfig | config} for SageMakerTrainingSessionRuntimeClient's `config` shape.
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link ConflictException} (client fault)
|
|
98
|
+
* <p>The training session is in a state that cannot accept new operations. The session must be in <code>Running</code> or <code>Blocked</code> state to accept requests.</p>
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link InternalServerException} (server fault)
|
|
101
|
+
* <p>An internal service error occurred. Retry the request using exponential backoff.</p>
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
104
|
+
* <p>The specified training session or operation does not exist, or the operation does not belong to the specified training session.</p>
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
107
|
+
* <p>The request was throttled. Retry the request after a brief wait using exponential backoff.</p>
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link ValidationException} (client fault)
|
|
110
|
+
* <p>The request is not valid. Check the request syntax and parameters. Examples include invalid sequence numbers, malformed client tokens, missing required fields, or invalid operation configuration.</p>
|
|
111
|
+
*
|
|
112
|
+
* @throws {@link SageMakerTrainingSessionRuntimeServiceException}
|
|
113
|
+
* <p>Base exception class for all service exceptions from SageMakerTrainingSessionRuntime service.</p>
|
|
114
|
+
*
|
|
115
|
+
*
|
|
116
|
+
* @example Generate samples from a prompt
|
|
117
|
+
* ```javascript
|
|
118
|
+
* // Generates completions for a tokenized prompt using the session's current weights. Generation behavior is controlled by `samplingParams`, and the operation is dispatched asynchronously.
|
|
119
|
+
* const input = {
|
|
120
|
+
* operationConfig: {
|
|
121
|
+
* sample: {
|
|
122
|
+
* numSamples: 4,
|
|
123
|
+
* prompt: {
|
|
124
|
+
* chunks: [
|
|
125
|
+
* {
|
|
126
|
+
* tokens: [
|
|
127
|
+
* 791,
|
|
128
|
+
* 6864,
|
|
129
|
+
* 315,
|
|
130
|
+
* 9822,
|
|
131
|
+
* 374
|
|
132
|
+
* ],
|
|
133
|
+
* type: "encoded_text"
|
|
134
|
+
* }
|
|
135
|
+
* ]
|
|
136
|
+
* },
|
|
137
|
+
* samplingParams: {
|
|
138
|
+
* maxTokens: 1024,
|
|
139
|
+
* temperature: 0.7,
|
|
140
|
+
* topP: 0.9
|
|
141
|
+
* }
|
|
142
|
+
* }
|
|
143
|
+
* },
|
|
144
|
+
* trainingSessionName: "my-training-session"
|
|
145
|
+
* };
|
|
146
|
+
* const command = new ExecuteSamplingOperationCommand(input);
|
|
147
|
+
* const response = await client.send(command);
|
|
148
|
+
* /* response is
|
|
149
|
+
* {
|
|
150
|
+
* operationId: "b2c3d4e5-6789-01bc-def0-234567890abc"
|
|
151
|
+
* }
|
|
152
|
+
* *\/
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export declare class ExecuteSamplingOperationCommand extends ExecuteSamplingOperationCommand_base {
|
|
158
|
+
/** @internal type navigation helper, not in runtime. */
|
|
159
|
+
protected static __types: {
|
|
160
|
+
api: {
|
|
161
|
+
input: ExecuteSamplingOperationInput;
|
|
162
|
+
output: ExecuteSamplingOperationOutput;
|
|
163
|
+
};
|
|
164
|
+
sdk: {
|
|
165
|
+
input: ExecuteSamplingOperationCommandInput;
|
|
166
|
+
output: ExecuteSamplingOperationCommandOutput;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
}
|