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

filter: Statementstmt 0.0% 0 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 9 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::SageMaker::OutputConfig;
3 use Moose;
4 has CompilerOptions => (is => 'ro', isa => 'Str');
5 has KmsKeyId => (is => 'ro', isa => 'Str');
6 has S3OutputLocation => (is => 'ro', isa => 'Str', required => 1);
7 has TargetDevice => (is => 'ro', isa => 'Str');
8 has TargetPlatform => (is => 'ro', isa => 'Paws::SageMaker::TargetPlatform');
9  
10 1;
11  
12 ### main pod documentation begin ###
13  
14 =head1 NAME
15  
16 Paws::SageMaker::OutputConfig
17  
18 =head1 USAGE
19  
20 This class represents one of two things:
21  
22 =head3 Arguments in a call to a service
23  
24 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
25 Each attribute should be used as a named argument in the calls that expect this type of object.
26  
27 As an example, if Att1 is expected to be a Paws::SageMaker::OutputConfig object:
28  
29 $service_obj->Method(Att1 => { CompilerOptions => $value, ..., TargetPlatform => $value });
30  
31 =head3 Results returned from an API call
32  
33 Use accessors for each attribute. If Att1 is expected to be an Paws::SageMaker::OutputConfig object:
34  
35 $result = $service_obj->Method(...);
36 $result->Att1->CompilerOptions
37  
38 =head1 DESCRIPTION
39  
40 Contains information about the output location for the compiled model
41 and the target device that the model runs on. C<TargetDevice> and
42 C<TargetPlatform> are mutually exclusive, so you need to choose one
43 between the two to specify your target device or platform. If you
44 cannot find your device you want to use from the C<TargetDevice> list,
45 use C<TargetPlatform> to describe the platform of your edge device and
46 C<CompilerOptions> if there are specific settings that are required or
47 recommended to use for particular TargetPlatform.
48  
49 =head1 ATTRIBUTES
50  
51  
52 =head2 CompilerOptions => Str
53  
54 Specifies additional parameters for compiler options in JSON format.
55 The compiler options are C<TargetPlatform> specific. It is required for
56 NVIDIA accelerators and highly recommended for CPU compilations. For
57 any other cases, it is optional to specify C<CompilerOptions.>
58  
59 =over
60  
61 =item *
62  
63 C<DTYPE>: Specifies the data type for the input. When compiling for
64 C<ml_*> (except for C<ml_inf>) instances using PyTorch framework,
65 provide the data type (dtype) of the model's input. C<"float32"> is
66 used if C<"DTYPE"> is not specified. Options for data type are:
67  
68 =over
69  
70 =item *
71  
72 float32: Use either C<"float"> or C<"float32">.
73  
74 =item *
75  
76 int64: Use either C<"int64"> or C<"long">.
77  
78 =back
79  
80 For example, C<{"dtype" : "float32"}>.
81  
82 =item *
83  
84 C<CPU>: Compilation for CPU supports the following compiler options.
85  
86 =over
87  
88 =item *
89  
90 C<mcpu>: CPU micro-architecture. For example, C<{'mcpu':
91 'skylake-avx512'}>
92  
93 =item *
94  
95 C<mattr>: CPU flags. For example, C<{'mattr': ['+neon', '+vfpv4']}>
96  
97 =back
98  
99 =item *
100  
101 C<ARM>: Details of ARM CPU compilations.
102  
103 =over
104  
105 =item *
106  
107 C<NEON>: NEON is an implementation of the Advanced SIMD extension used
108 in ARMv7 processors.
109  
110 For example, add C<{'mattr': ['+neon']}> to the compiler options if
111 compiling for ARM 32-bit platform with the NEON support.
112  
113 =back
114  
115 =item *
116  
117 C<NVIDIA>: Compilation for NVIDIA GPU supports the following compiler
118 options.
119  
120 =over
121  
122 =item *
123  
124 C<gpu_code>: Specifies the targeted architecture.
125  
126 =item *
127  
128 C<trt-ver>: Specifies the TensorRT versions in x.y.z. format.
129  
130 =item *
131  
132 C<cuda-ver>: Specifies the CUDA version in x.y format.
133  
134 =back
135  
136 For example, C<{'gpu-code': 'sm_72', 'trt-ver': '6.0.1', 'cuda-ver':
137 '10.1'}>
138  
139 =item *
140  
141 C<ANDROID>: Compilation for the Android OS supports the following
142 compiler options:
143  
144 =over
145  
146 =item *
147  
148 C<ANDROID_PLATFORM>: Specifies the Android API levels. Available levels
149 range from 21 to 29. For example, C<{'ANDROID_PLATFORM': 28}>.
150  
151 =item *
152  
153 C<mattr>: Add C<{'mattr': ['+neon']}> to compiler options if compiling
154 for ARM 32-bit platform with NEON support.
155  
156 =back
157  
158 =item *
159  
160 C<INFERENTIA>: Compilation for target ml_inf1 uses compiler options
161 passed in as a JSON string. For example, C<"CompilerOptions":
162 "\"--verbose 1 --num-neuroncores 2 -O2\"">.
163  
164 For information about supported compiler options, see Neuron Compiler
165 CLI
166 (https://github.com/aws/aws-neuron-sdk/blob/master/docs/neuron-cc/command-line-reference.md).
167  
168 =item *
169  
170 C<CoreML>: Compilation for the CoreML OutputConfig$TargetDevice
171 supports the following compiler options:
172  
173 =over
174  
175 =item *
176  
177 C<class_labels>: Specifies the classification labels file name inside
178 input tar.gz file. For example, C<{"class_labels":
179 "imagenet_labels_1000.txt"}>. Labels inside the txt file should be
180 separated by newlines.
181  
182 =back
183  
184 =item *
185  
186 C<EIA>: Compilation for the Elastic Inference Accelerator supports the
187 following compiler options:
188  
189 =over
190  
191 =item *
192  
193 C<precision_mode>: Specifies the precision of compiled artifacts.
194 Supported values are C<"FP16"> and C<"FP32">. Default is C<"FP32">.
195  
196 =item *
197  
198 C<signature_def_key>: Specifies the signature to use for models in
199 SavedModel format. Defaults is TensorFlow's default signature def key.
200  
201 =item *
202  
203 C<output_names>: Specifies a list of output tensor names for models in
204 FrozenGraph format. Set at most one API field, either:
205 C<signature_def_key> or C<output_names>.
206  
207 =back
208  
209 For example: C<{"precision_mode": "FP32", "output_names":
210 ["output:0"]}>
211  
212 =back
213  
214  
215  
216 =head2 KmsKeyId => Str
217  
218 The Amazon Web Services Key Management Service key (Amazon Web Services
219 KMS) that Amazon SageMaker uses to encrypt your output models with
220 Amazon S3 server-side encryption after compilation job. If you don't
221 provide a KMS key ID, Amazon SageMaker uses the default KMS key for
222 Amazon S3 for your role's account. For more information, see
223 KMS-Managed Encryption Keys
224 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html)
225 in the I<Amazon Simple Storage Service Developer Guide.>
226  
227 The KmsKeyId can be any of the following formats:
228  
229 =over
230  
231 =item *
232  
233 Key ID: C<1234abcd-12ab-34cd-56ef-1234567890ab>
234  
235 =item *
236  
237 Key ARN:
238 C<arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab>
239  
240 =item *
241  
242 Alias name: C<alias/ExampleAlias>
243  
244 =item *
245  
246 Alias name ARN:
247 C<arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias>
248  
249 =back
250  
251  
252  
253 =head2 B<REQUIRED> S3OutputLocation => Str
254  
255 Identifies the S3 bucket where you want Amazon SageMaker to store the
256 model artifacts. For example, C<s3://bucket-name/key-name-prefix>.
257  
258  
259 =head2 TargetDevice => Str
260  
261 Identifies the target device or the machine learning instance that you
262 want to run your model on after the compilation has completed.
263 Alternatively, you can specify OS, architecture, and accelerator using
264 TargetPlatform fields. It can be used instead of C<TargetPlatform>.
265  
266  
267 =head2 TargetPlatform => L<Paws::SageMaker::TargetPlatform>
268  
269 Contains information about a target platform that you want your model
270 to run on, such as OS, architecture, and accelerators. It is an
271 alternative of C<TargetDevice>.
272  
273 The following examples show how to configure the C<TargetPlatform> and
274 C<CompilerOptions> JSON strings for popular target platforms:
275  
276 =over
277  
278 =item *
279  
280 Raspberry Pi 3 Model B+
281  
282 C<"TargetPlatform": {"Os": "LINUX", "Arch": "ARM_EABIHF"},>
283  
284 C<"CompilerOptions": {'mattr': ['+neon']}>
285  
286 =item *
287  
288 Jetson TX2
289  
290 C<"TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator":
291 "NVIDIA"},>
292  
293 C<"CompilerOptions": {'gpu-code': 'sm_62', 'trt-ver': '6.0.1',
294 'cuda-ver': '10.0'}>
295  
296 =item *
297  
298 EC2 m5.2xlarge instance OS
299  
300 C<"TargetPlatform": {"Os": "LINUX", "Arch": "X86_64", "Accelerator":
301 "NVIDIA"},>
302  
303 C<"CompilerOptions": {'mcpu': 'skylake-avx512'}>
304  
305 =item *
306  
307 RK3399
308  
309 C<"TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator":
310 "MALI"}>
311  
312 =item *
313  
314 ARMv7 phone (CPU)
315  
316 C<"TargetPlatform": {"Os": "ANDROID", "Arch": "ARM_EABI"},>
317  
318 C<"CompilerOptions": {'ANDROID_PLATFORM': 25, 'mattr': ['+neon']}>
319  
320 =item *
321  
322 ARMv8 phone (CPU)
323  
324 C<"TargetPlatform": {"Os": "ANDROID", "Arch": "ARM64"},>
325  
326 C<"CompilerOptions": {'ANDROID_PLATFORM': 29}>
327  
328 =back
329  
330  
331  
332  
333 =head1 SEE ALSO
334  
335 This class forms part of L<Paws>, describing an object used in L<Paws::SageMaker>
336  
337 =head1 BUGS and CONTRIBUTIONS
338  
339 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
340  
341 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
342  
343 =cut
344