A TensorFlow model uses an existing train.py script and static training data stored as TFRecord files. The team wants to provide this data to SageMaker with the least development work. What is the simplest way to supply the training data to SageMaker without changing the training code?
Choose an answer
Tap an option to check your answer.
Correct answer: Use SageMaker script mode with train.py unchanged, upload the TFRecord files to an S3 bucket, and point the SageMaker training job to that S3 location (no reformatting)..
Why this is the answer
The correct answer is to use SageMaker script mode with the train.py script unchanged, upload the TFRecord files to an S3 bucket, and point the SageMaker training job to that S3 location. SageMaker script mode is designed to run existing training scripts with minimal modifications. It automatically handles downloading data from S3 to the training instance and making it available at a local path, which the train.py script can then access. TFRecord is a standard TensorFlow format, so no conversion is needed. The other options involve unnecessary data conversions or code modifications. Converting TFRecord to protobuf (option 1) is not required as TFRecord is directly usable by TensorFlow. Modifying train.py to convert at runtime (option 2) adds complexity and is unnecessary. Pointing to a local path without reformatting (option 3) is incomplete; the data still needs to be made available to the SageMaker instance, which S3 and script mode accomplish.
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