提交 854e16f0 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2033 fix mindrecord seekg failed

Merge pull request !2033 from guozhijian/fix_seekg_failed
......@@ -90,7 +90,7 @@ MSRStatus ShardWriter::OpenDataFiles(bool append) {
fs->close();
// open the mindrecord file to write
fs->open(common::SafeCStr(file), std::ios::out | std::ios::binary);
fs->open(common::SafeCStr(file), std::ios::out | std::ios::in | std::ios::binary | std::ios::trunc);
if (!fs->good()) {
MS_LOG(ERROR) << "MindRecord file could not opened.";
return FAILED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册