Training machine learning models requires feeding input data for models to ingest. Input pipelines for machine learning jobs are often challenging to implement efficiently as they require reading large volumes of data, applying complex transformations, and transferring data to hardware accelerators while overlapping computation and communication to achieve optimal performance. We present tf.data, a framework for building and executing efficient input pipelines for machine learning jobs. The tf.data API provides operators which can be parameterized with user-defined computation, composed, and reused across different machine learning domains. These abstractions allow users to focus on the application logic of data processing, while tf.data's runtime ensures that pipelines run efficiently. We demonstrate that input pipeline performance is critical to the end-to-end training time of state-of-the-art machine learning models. tf.data delivers the high performance required, while avoiding the need for manual tuning of performance knobs. We show that tf.data features, such as parallelism, caching, static optimizations, and non-deterministic execution are essential for high performance. Finally, we characterize machine learning input pipelines for millions of jobs that ran in Google's fleet, showing that input data processing is highly diverse and consumes a significant fraction of job resources. Our analysis motivates future research directions, such as sharing computation across jobs and pushing data projection to the storage layer.
翻译:用于机器学习工作的输入管道往往具有挑战性,因为需要阅读大量数据,应用复杂的转换,并将数据传输到硬件加速器,同时进行重复计算和通信,以达到最佳性能。我们提供tf.data,这是为机器学习工作建设和实施高效输入管道的框架。tf.data API提供操作员,这些操作员可以使用用户定义的计算,组成和再利用于不同的机器学习领域。这些抽象化使用户能够关注数据处理的应用逻辑,而数据运行的时间则确保管道运行效率。我们证明投入管道的性能对于最先进的机器学习模型的端到端培训时间至关重要,这提供了所需的高性能,同时避免了手动调整性能 knobs的需要。我们显示,Tf.data的特征,例如平行性、缓冲、静态优化和非非端化执行对于高性能运行速度确保管道运行效率。最后,我们证明输入管道的性能对于最终培训时间对于机器输入模型模型模型模型模型的升级,我们为高额的升级的流程,从而显示我们在未来的工作流程的流程中进行大量输入流程的流程,从而显示我们进行大量输入的工作流程的流程的工作流程的流程,从而显示我们为高额的流程的流程的流程的流程的流程的流程的流程的流程,从而显示我们将持续进行大量输入的流程的流程的流程的流程的流程,从而显示我们进行着在进行大量输入的流程的流程的流程的流程的流程的流程的流程的流程。