Courseiva
Data Preparation for Machine LearninghardMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A data scientist is preparing a large dataset (50 GB) for training a TensorFlow model on SageMaker. The dataset consists of many small CSV files. Training is slow due to I/O bottlenecks. Which data preparation strategy most effectively accelerates training?

⚠ Common exam trap

Candidates often choose larger instances (Option D) as a brute-force fix, failing to recognize that the root cause is the small-file I/O pattern, which requires a format change (TFRecord) rather than more compute resources.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Convert the dataset to TFRecord format and use tf.data pipeline with prefetching

TFRecord format stores data in a binary, row-oriented format that TensorFlow's tf.data API can read efficiently, especially with prefetching to overlap data loading with model computation. This eliminates the per-file open/parse overhead of many small CSV files, which is the primary cause of I/O bottlenecks in this scenario.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Convert the dataset to TFRecord format and use tf.data pipeline with prefetching

    Why this is correct

    TFRecord combines many records into a few large files, and prefetching improves data pipeline efficiency.

  • Convert the dataset to Parquet format and use Apache Arrow for loading

    Why it's wrong here

    Parquet is good for analytics but not as efficient for TensorFlow training as TFRecord.

  • Compress the CSV files and decompress during data loading

    Why it's wrong here

    Decompression adds overhead and does not solve file fragmentation.

  • Use a larger instance type with more vCPUs

    Why it's wrong here

    This does not address I/O bottlenecks from many small files.

About these practice questions

One of 835 original MLA-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLA-C01 exam.