MLS-C01 · Question #369
A media company is building a computer vision model to analyze images that are on social media. The model consists of CNNs that the company trained by using images that the company stores in Amazon…
The correct answer is A. Instead of File mode, configure the SageMaker training job to use Pipe mode. Ingest the data from. To speed up daily training for a computer vision model on SageMaker and lower costs without code changes, the ML engineer should switch from File mode to Pipe mode, which streams data directly from Amazon S3.
Question
A media company is building a computer vision model to analyze images that are on social media. The model consists of CNNs that the company trained by using images that the company stores in Amazon S3. The company used an Amazon SageMaker training job in File mode with a single Amazon EC2 On-Demand Instance. Every day, the company updates the model by using about 10,000 images that the company has collected in the last 24 hours. The company configures training with only one epoch. The company wants to speed up training and lower costs without the need to make any code changes. Which solution will meet these requirements?
Options
- AInstead of File mode, configure the SageMaker training job to use Pipe mode. Ingest the data from
- BInstead of File mode, configure the SageMaker training job to use FastFile mode with no other
- CInstead of On-Demand Instances, configure the SageMaker training job to use Spot Instances.
- DInstead of On-Demand Instances, configure the SageMaker training job to use Spot Instances,
How the community answered
(42 responses)- A79% (33)
- B12% (5)
- C2% (1)
- D7% (3)
Why each option
To speed up daily training for a computer vision model on SageMaker and lower costs without code changes, the ML engineer should switch from File mode to Pipe mode, which streams data directly from Amazon S3.
Switching from File mode to Pipe mode for SageMaker training jobs streams data directly from Amazon S3 to the training instance without fully downloading the entire dataset upfront. This significantly speeds up training by reducing I/O bottlenecks and data transfer time, especially with large datasets and frequent training, thereby also lowering costs by reducing instance runtime, all typically achievable without requiring code changes to the training script.
FastFile mode improves upon File mode by optimizing data downloading and caching, but it still involves downloading the data, which is less efficient than the streaming approach of Pipe mode for speeding up training.
Using Spot Instances will lower costs due to cheaper hourly rates, but it does not inherently speed up training; in fact, potential interruptions can prolong the total training duration.
While using Spot Instances lowers costs and distributed training with multiple instances can speed up training, configuring a distributed training job typically requires significant code changes to the training script to manage distributed processing, violating the 'without the need to make any code changes' constraint.
Concept tested: SageMaker training data input modes
Source: https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-training.html#td-input-modes
Topics
Community Discussion
No community discussion yet for this question.