提交 3afb8411 编写于 作者: X xiexionghang

fix epoch_done save

上级 3d2c41e1
......@@ -49,12 +49,16 @@ namespace feed {
set_status(EpochStatusFiled::CheckpointPathField, _last_checkpoint_path);
set_status(EpochStatusFiled::DateField, format_timestamp(epoch_id, "%Y%m%d-%H%M"));
set_status(EpochStatusFiled::InferenceBaseKeyField, _inference_base_model_key);
auto* env = _trainer_context->environment.get();
if (env->is_master_node(EnvironmentRole::WORKER)) {
if (epoch_id > _last_done_epoch_id) {
// 保留末尾1000数据
auto fs = _trainer_context->file_system.get();
std::string done_str = paddle::string::join_strings(_done_status, '\t');
fs->append_line(_done_file_path, done_str, 1000);
}
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册