使用 TensorFlowTrainingJob 进行参数服务器训练
本教程演示如何使用 TensorFlowTrainingJob 对 Keras 模型进行参数服务器(parameter server)训练(采用 tf.distribute.experimental.ParameterServerStrategy
分布式策略)。
运行示例
请按照使用方法准备环境,然后前往本教程对应的示例,参照其 README 文档运行。
检查训练日志和指标
训练开始后,进入模型构建控制台的 Job 页面,可以看到名为 keras-mnist-trainingjob-ps 的 TensorFlowTrainingJob 正在运行:

点击该名称进入详情页面,可以看到刚才创建的 TensorFlowTrainingJob 的基本信息、状况信息和事件信息:

点击 TensorBoard 右侧的 Running 打开 TensorBoard,可以查看可视化展示的训练和验证指标:

点击上方标签页的副本,查看 TensorFlowTrainingJob 的 Pod 信息:

点击副本右侧的更多按钮 > 日志以查看训练脚本执行过程中的日志输出:

点击上方标签页的指标,查看 TensorFlowTrainingJob 运行过程中使用集群计算资源、网络资源和存储资源的情况:

一段时间之后,TensorFlowTrainingJob 的状态变为 Succeeded,表示训练成功完成。

若 TensorFlowTrainingJob 在运行过程中出错,其状态会变为 Error,并在事件信息和 Pod 信息部分显示错误信息,此时需要根据给出的错误信息进行问题排查。