A team has a TensorFlow training script that they currently run locally and want to train on SageMaker as cost-effectively as possible. Which TensorFlow estimator configuration will reduce training cost the most while still using the existing script?
Choose an answer
Tap an option to check your answer.
Correct answer: Enable SageMaker Training Compiler by passing compiler_config=TrainingCompilerConfig() to the Estimator and enable managed spot training by setting use_spot_instances=True. Provide the training script to the estimator.fit() call..
Why this is the answer
The most cost-effective solution combines two powerful SageMaker features: Training Compiler and Managed Spot Training. SageMaker Training Compiler optimizes TensorFlow models for faster training on GPUs, reducing the overall compute time and thus the cost. Managed Spot Training leverages AWS EC2 Spot Instances, which offer significantly lower prices than On-Demand instances, further reducing costs. By setting usespotinstances=True, SageMaker automatically manages the Spot Instance lifecycle, including interruptions and checkpointing, to complete the training job. Modifying the script for distributed data parallelism would increase complexity and might not be the most cost-effective if the model doesn't strictly require it for performance. Enabling only the Training Compiler is good but misses the additional savings from Spot Instances. Setting MaxWaitTimeInSeconds equal to MaxRuntimeInSeconds is not a cost-saving measure; it defines how long SageMaker will wait for a Spot Instance before giving up, and how long the job is allowed to run, respectively.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed