blib/lib/Paws/SageMaker/CreateAlgorithm.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::SageMaker::CreateAlgorithm;
3 use Moose;
4 has AlgorithmDescription => (is => 'ro', isa => 'Str');
5 has AlgorithmName => (is => 'ro', isa => 'Str', required => 1);
6 has CertifyForMarketplace => (is => 'ro', isa => 'Bool');
7 has InferenceSpecification => (is => 'ro', isa => 'Paws::SageMaker::InferenceSpecification');
8 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::SageMaker::Tag]');
9 has TrainingSpecification => (is => 'ro', isa => 'Paws::SageMaker::TrainingSpecification', required => 1);
10 has ValidationSpecification => (is => 'ro', isa => 'Paws::SageMaker::AlgorithmValidationSpecification');
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateAlgorithm');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SageMaker::CreateAlgorithmOutput');
16 class_has _result_key => (isa => 'Str', is => 'ro');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::SageMaker::CreateAlgorithm - Arguments for method CreateAlgorithm on L<Paws::SageMaker>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method CreateAlgorithm on the
28 L<Amazon SageMaker Service|Paws::SageMaker> service. Use the attributes of this class
29 as arguments to method CreateAlgorithm.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateAlgorithm.
32  
33 =head1 SYNOPSIS
34  
35 my $api.sagemaker = Paws->service('SageMaker');
36 my $CreateAlgorithmOutput = $api . sagemaker->CreateAlgorithm(
37 AlgorithmName => 'MyEntityName',
38 TrainingSpecification => {
39 SupportedTrainingInstanceTypes => [
40 'ml.m4.xlarge',
41 ... # values: ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
42 ],
43 TrainingChannels => [
44 {
45 Name => 'MyChannelName', # min: 1, max: 64
46 SupportedContentTypes => [
47 'MyContentType', ... # max: 256
48 ],
49 SupportedInputModes => [
50 'Pipe', ... # values: Pipe, File
51 ], # min: 1
52 Description => 'MyEntityDescription', # max: 1024; OPTIONAL
53 IsRequired => 1, # OPTIONAL
54 SupportedCompressionTypes => [
55 'None', ... # values: None, Gzip
56 ], # OPTIONAL
57 },
58 ...
59 ], # min: 1, max: 8
60 TrainingImage => 'MyContainerImage', # max: 255
61 MetricDefinitions => [
62 {
63 Name => 'MyMetricName', # min: 1, max: 255
64 Regex => 'MyMetricRegex', # min: 1, max: 500
65  
66 },
67 ...
68 ], # max: 40; OPTIONAL
69 SupportedHyperParameters => [
70 {
71 Name => 'MyParameterName', # max: 256
72 Type =>
73 'Integer', # values: Integer, Continuous, Categorical, FreeText
74 DefaultValue => 'MyHyperParameterValue', # max: 2500; OPTIONAL
75 Description => 'MyEntityDescription', # max: 1024; OPTIONAL
76 IsRequired => 1, # OPTIONAL
77 IsTunable => 1, # OPTIONAL
78 Range => {
79 CategoricalParameterRangeSpecification => {
80 Values => [
81 'MyParameterValue', ... # max: 256
82 ], # min: 1, max: 20
83  
84 }, # OPTIONAL
85 ContinuousParameterRangeSpecification => {
86 MaxValue => 'MyParameterValue', # max: 256
87 MinValue => 'MyParameterValue', # max: 256
88  
89 }, # OPTIONAL
90 IntegerParameterRangeSpecification => {
91 MaxValue => 'MyParameterValue', # max: 256
92 MinValue => 'MyParameterValue', # max: 256
93  
94 }, # OPTIONAL
95 }, # OPTIONAL
96 },
97 ...
98 ], # max: 100; OPTIONAL
99 SupportedTuningJobObjectiveMetrics => [
100 {
101 MetricName => 'MyMetricName', # min: 1, max: 255
102 Type => 'Maximize', # values: Maximize, Minimize
103  
104 },
105 ...
106 ], # OPTIONAL
107 SupportsDistributedTraining => 1, # OPTIONAL
108 TrainingImageDigest => 'MyImageDigest', # max: 72; OPTIONAL
109 },
110 AlgorithmDescription => 'MyEntityDescription', # OPTIONAL
111 CertifyForMarketplace => 1, # OPTIONAL
112 InferenceSpecification => {
113 Containers => [
114 {
115 Image => 'MyContainerImage', # max: 255
116 ContainerHostname => 'MyContainerHostname', # max: 63; OPTIONAL
117 Environment => {
118 'MyEnvironmentKey' =>
119 'MyEnvironmentValue', # key: max: 1024, value: max: 1024
120 }, # max: 16; OPTIONAL
121 ImageDigest => 'MyImageDigest', # max: 72; OPTIONAL
122 ModelDataUrl => 'MyUrl', # max: 1024; OPTIONAL
123 ProductId => 'MyProductId', # max: 256; OPTIONAL
124 },
125 ...
126 ], # min: 1, max: 5
127 SupportedContentTypes => [
128 'MyContentType', ... # max: 256
129 ],
130 SupportedResponseMIMETypes => [
131 'MyResponseMIMEType', ... # max: 1024
132 ],
133 SupportedRealtimeInferenceInstanceTypes => [
134 'ml.t2.medium',
135 ... # values: ml.t2.medium, ml.t2.large, ml.t2.xlarge, ml.t2.2xlarge, ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.m5d.large, ml.m5d.xlarge, ml.m5d.2xlarge, ml.m5d.4xlarge, ml.m5d.12xlarge, ml.m5d.24xlarge, ml.c4.large, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.large, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5d.large, ml.c5d.xlarge, ml.c5d.2xlarge, ml.c5d.4xlarge, ml.c5d.9xlarge, ml.c5d.18xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.r5.large, ml.r5.xlarge, ml.r5.2xlarge, ml.r5.4xlarge, ml.r5.12xlarge, ml.r5.24xlarge, ml.r5d.large, ml.r5d.xlarge, ml.r5d.2xlarge, ml.r5d.4xlarge, ml.r5d.12xlarge, ml.r5d.24xlarge, ml.inf1.xlarge, ml.inf1.2xlarge, ml.inf1.6xlarge, ml.inf1.24xlarge
136 ], # OPTIONAL
137 SupportedTransformInstanceTypes => [
138 'ml.m4.xlarge',
139 ... # values: ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
140 ], # min: 1; OPTIONAL
141 }, # OPTIONAL
142 Tags => [
143 {
144 Key => 'MyTagKey', # min: 1, max: 128
145 Value => 'MyTagValue', # max: 256
146  
147 },
148 ...
149 ], # OPTIONAL
150 ValidationSpecification => {
151 ValidationProfiles => [
152 {
153 ProfileName => 'MyEntityName', # min: 1, max: 63
154 TrainingJobDefinition => {
155 InputDataConfig => [
156 {
157 ChannelName => 'MyChannelName', # min: 1, max: 64
158 DataSource => {
159 FileSystemDataSource => {
160 DirectoryPath => 'MyDirectoryPath', # max: 4096
161 FileSystemAccessMode => 'rw', # values: rw, ro
162 FileSystemId => 'MyFileSystemId', # min: 11
163 FileSystemType => 'EFS', # values: EFS, FSxLustre
164  
165 }, # OPTIONAL
166 S3DataSource => {
167 S3DataType => 'ManifestFile'
168 , # values: ManifestFile, S3Prefix, AugmentedManifestFile
169 S3Uri => 'MyS3Uri', # max: 1024
170 AttributeNames => [
171 'MyAttributeName', ... # min: 1, max: 256
172 ], # max: 16; OPTIONAL
173 S3DataDistributionType => 'FullyReplicated'
174 , # values: FullyReplicated, ShardedByS3Key; OPTIONAL
175 }, # OPTIONAL
176 },
177 CompressionType => 'None', # values: None, Gzip
178 ContentType => 'MyContentType', # max: 256
179 InputMode => 'Pipe', # values: Pipe, File
180 RecordWrapperType =>
181 'None', # values: None, RecordIO; OPTIONAL
182 ShuffleConfig => {
183 Seed => 1,
184  
185 }, # OPTIONAL
186 },
187 ...
188 ], # min: 1, max: 20
189 OutputDataConfig => {
190 S3OutputPath => 'MyS3Uri', # max: 1024
191 KmsKeyId => 'MyKmsKeyId', # max: 2048; OPTIONAL
192 },
193 ResourceConfig => {
194 InstanceCount => 1, # min: 1
195 InstanceType => 'ml.m4.xlarge'
196 , # values: ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.p3dn.24xlarge, ml.p4d.24xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.c5n.xlarge, ml.c5n.2xlarge, ml.c5n.4xlarge, ml.c5n.9xlarge, ml.c5n.18xlarge
197 VolumeSizeInGB => 1, # min: 1
198 VolumeKmsKeyId => 'MyKmsKeyId', # max: 2048; OPTIONAL
199 },
200 StoppingCondition => {
201 MaxRuntimeInSeconds => 1, # min: 1; OPTIONAL
202 MaxWaitTimeInSeconds => 1, # min: 1; OPTIONAL
203 },
204 TrainingInputMode => 'Pipe', # values: Pipe, File
205 HyperParameters => {
206 'MyHyperParameterKey' => 'MyHyperParameterValue'
207 , # key: max: 256, value: max: 2500; OPTIONAL
208 }, # max: 100; OPTIONAL
209 },
210 TransformJobDefinition => {
211 TransformInput => {
212 DataSource => {
213 S3DataSource => {
214 S3DataType => 'ManifestFile'
215 , # values: ManifestFile, S3Prefix, AugmentedManifestFile
216 S3Uri => 'MyS3Uri', # max: 1024
217  
218 },
219  
220 },
221 CompressionType => 'None', # values: None, Gzip
222 ContentType => 'MyContentType', # max: 256
223 SplitType =>
224 'None', # values: None, Line, RecordIO, TFRecord; OPTIONAL
225 },
226 TransformOutput => {
227 S3OutputPath => 'MyS3Uri', # max: 1024
228 Accept => 'MyAccept', # max: 256; OPTIONAL
229 AssembleWith => 'None', # values: None, Line; OPTIONAL
230 KmsKeyId => 'MyKmsKeyId', # max: 2048; OPTIONAL
231 },
232 TransformResources => {
233 InstanceCount => 1, # min: 1
234 InstanceType => 'ml.m4.xlarge'
235 , # values: ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge, ml.g4dn.8xlarge, ml.g4dn.12xlarge, ml.g4dn.16xlarge
236 VolumeKmsKeyId => 'MyKmsKeyId', # max: 2048; OPTIONAL
237 },
238 BatchStrategy =>
239 'MultiRecord', # values: MultiRecord, SingleRecord; OPTIONAL
240 Environment => {
241 'MyTransformEnvironmentKey' => 'MyTransformEnvironmentValue'
242 , # key: max: 1024, value: max: 10240
243 }, # max: 16; OPTIONAL
244 MaxConcurrentTransforms => 1, # OPTIONAL
245 MaxPayloadInMB => 1, # OPTIONAL
246 }, # OPTIONAL
247 },
248 ...
249 ], # min: 1, max: 1
250 ValidationRole => 'MyRoleArn', # min: 20, max: 2048
251  
252 }, # OPTIONAL
253 );
254  
255 # Results:
256 my $AlgorithmArn = $CreateAlgorithmOutput->AlgorithmArn;
257  
258 # Returns a L<Paws::SageMaker::CreateAlgorithmOutput> object.
259  
260 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
261 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/api.sagemaker/CreateAlgorithm>
262  
263 =head1 ATTRIBUTES
264  
265  
266 =head2 AlgorithmDescription => Str
267  
268 A description of the algorithm.
269  
270  
271  
272 =head2 B<REQUIRED> AlgorithmName => Str
273  
274 The name of the algorithm.
275  
276  
277  
278 =head2 CertifyForMarketplace => Bool
279  
280 Whether to certify the algorithm so that it can be listed in Amazon Web
281 Services Marketplace.
282  
283  
284  
285 =head2 InferenceSpecification => L<Paws::SageMaker::InferenceSpecification>
286  
287 Specifies details about inference jobs that the algorithm runs,
288 including the following:
289  
290 =over
291  
292 =item *
293  
294 The Amazon ECR paths of containers that contain the inference code and
295 model artifacts.
296  
297 =item *
298  
299 The instance types that the algorithm supports for transform jobs and
300 real-time endpoints used for inference.
301  
302 =item *
303  
304 The input and output content formats that the algorithm supports for
305 inference.
306  
307 =back
308  
309  
310  
311  
312 =head2 Tags => ArrayRef[L<Paws::SageMaker::Tag>]
313  
314 An array of key-value pairs. You can use tags to categorize your Amazon
315 Web Services resources in different ways, for example, by purpose,
316 owner, or environment. For more information, see Tagging Amazon Web
317 Services Resources
318 (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).
319  
320  
321  
322 =head2 B<REQUIRED> TrainingSpecification => L<Paws::SageMaker::TrainingSpecification>
323  
324 Specifies details about training jobs run by this algorithm, including
325 the following:
326  
327 =over
328  
329 =item *
330  
331 The Amazon ECR path of the container and the version digest of the
332 algorithm.
333  
334 =item *
335  
336 The hyperparameters that the algorithm supports.
337  
338 =item *
339  
340 The instance types that the algorithm supports for training.
341  
342 =item *
343  
344 Whether the algorithm supports distributed training.
345  
346 =item *
347  
348 The metrics that the algorithm emits to Amazon CloudWatch.
349  
350 =item *
351  
352 Which metrics that the algorithm emits can be used as the objective
353 metric for hyperparameter tuning jobs.
354  
355 =item *
356  
357 The input channels that the algorithm supports for training data. For
358 example, an algorithm might support C<train>, C<validation>, and
359 C<test> channels.
360  
361 =back
362  
363  
364  
365  
366 =head2 ValidationSpecification => L<Paws::SageMaker::AlgorithmValidationSpecification>
367  
368 Specifies configurations for one or more training jobs and that Amazon
369 SageMaker runs to test the algorithm's training code and, optionally,
370 one or more batch transform jobs that Amazon SageMaker runs to test the
371 algorithm's inference code.
372  
373  
374  
375  
376 =head1 SEE ALSO
377  
378 This class forms part of L<Paws>, documenting arguments for method CreateAlgorithm in L<Paws::SageMaker>
379  
380 =head1 BUGS and CONTRIBUTIONS
381  
382 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
383  
384 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
385  
386 =cut
387