MLA-C01 练习题

MLA-C01 题目讲解:Spot 节省费用,checkpoint 降低中断损失

MLA-C01 练习题讲解。答案 A。训练八小时,Spot 可降低实例价格,但可能中断或等待容量。

MLA-C01 免费试练题 · 考证匠讲解

题目

An ML engineer is training a deep learning model on Amazon SageMaker. The model requires training on 100 GB of image data using a GPU instance. The training job takes 8 hours to complete. The engineer wants to reduce the training cost by at least 60% without significantly increasing training time. Which approach should the engineer use?

A. Use SageMaker Managed Spot Training with checkpointing enabled. Configure the job to use Spot Instances and set the maximum wait time to 24 hours.
B. Use a smaller GPU instance type and increase the number of training epochs to compensate.
C. Use SageMaker Local Mode to train the model on a SageMaker notebook instance instead.
D. Split the training data into smaller batches and train separate models on each batch.

答案

答案 A。训练八小时,Spot 可降低实例价格,但可能中断或等待容量。

拆题

  • 训练八小时,Spot 可降低实例价格,但可能中断或等待容量。
  • Checkpoint 保存可恢复状态,框架需实际写入并读取,不是只填 S3 路径。
  • 至少省 60% 且不增训练时间不能由 Spot 保证;24 小时等待上限甚至允许作业明显延长,题面承诺过强。

每个选项为什么对、为什么错

  • A(正确):Managed Spot Training 配 checkpoint 是给定选项中成本优化路径;节省比例和完成时间必须实测,不能视为 SLA。
  • B:小 GPU 可能明显变慢,增加 epochs 也不是补偿容量的科学方法。
  • C:Local Mode 主要用于本地/开发调试,不保证大规模训练比 managed job 更低成本。
  • D:拆开数据训练不同模型改变学习问题,不是等价训练的直接节约方法。

放到具体场景里

教学例子:每十分钟写 checkpoint,Spot 中断后从最近状态恢复,最多重做约十分钟计算加启动等待。比较训练账单、重做分钟和 wall-clock time。若交付时限严格,应评估可用容量、On-Demand fallback 的授权与费用,而不是假定总能拿到 Spot。

检查对象本例条件或动作结果与边界
成本Spot 折扣比例不保证
恢复十分钟 checkpoint(假设)减少重做
时限max wait 24h可能延长总完成时间

遇到同类题的判断顺序

  1. 持久保存:框架写训练状态到 S3。
  2. 选择 Spot:设置等待与运行边界。
  3. 恢复训练:读取最新有效 checkpoint。
  4. 核对收益:比较费用与 wall-clock time。
结论:Spot 的风险是可用性与等待,checkpoint 只减少丢失计算,不消除等待。

参考资料

继续练这门考试

同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。