MLA-C01 练习题

MLA-C01 题目讲解:Pipe 流读取匹配 RecordIO-protobuf

MLA-C01 练习题讲解。答案 C。Pipe mode 边读 S3 边训练,不先完整下载到磁盘。

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

题目

A team is preparing a large labeled dataset in S3 to train a SageMaker built-in algorithm using Pipe mode, where training data streams directly from S3 into the algorithm container without being fully downloaded to local disk first, and they want the smallest possible per-record overhead during that streaming read. Which data format is specifically optimized for this SageMaker Pipe mode streaming pattern?

A. Plain JSON Lines, since each line is an independent, self-describing record that a Pipe mode reader can parse one line at a time as it streams from S3.
B. Apache ORC, since its columnar layout and embedded indexes allow a Pipe mode reader to skip directly to only the columns and rows the algorithm needs.
C. RecordIO-protobuf, since it packages records in a binary, length-prefixed container that SageMaker's built-in algorithms are optimized to stream and parse in Pipe mode.
D. Gzip-compressed CSV, since compression reduces the number of bytes that must be streamed from S3 during Pipe mode, which lowers the per-record read overhead.

答案

答案 C。Pipe mode 边读 S3 边训练,不先完整下载到磁盘。

拆题

  • Pipe mode 边读 S3 边训练,不先完整下载到磁盘。
  • RecordIO-protobuf 二进制记录框架减少逐条文本解析,适合支持它的 built-in algorithms。
  • 并非每个算法都支持相同格式;应查算法的输入规范,而不是强迫全部训练转这个格式。

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

  • A:JSON Lines 易检查,但文本和自描述字段增加解析开销,不是题中特定优化格式。
  • B:ORC 的列跳读依赖合适读取模式,不是顺序 Pipe 训练普遍支持的输入格式。
  • C(正确):RecordIO-protobuf 以二进制结构和记录边界适合指定内建算法的 Pipe 数据路径。
  • D:压缩 CSV 可省传输字节,但仍要解压、解析文本,不等于最低每记录开销。

放到具体场景里

教学例子:支持该格式的线性学习器读取带标签与稀疏特征的 RecordIO 文件,S3 数据通过 Pipe 通道流入容器。制作数据后先跑小批验证标签与维度,错误的 protobuf 编码会导致训练失败;不是换扩展名就变成合法格式。

检查对象本例条件或动作结果与边界
输入模式Pipe流式读取
格式RecordIO-protobuf算法支持前提
验证小批标签与维度防编码错误

遇到同类题的判断顺序

  1. 确认算法:查受支持输入格式。
  2. 编码记录:生成合法二进制样本。
  3. 配置 Pipe:通道模式与内容类型一致。
  4. 小批验证:吞吐、标签和训练结果检查。
结论:数据格式选择由算法和读取模式共同决定。

参考资料

继续练这门考试

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