forked from mindspore-Ecosystem/mindspore
!25729 unify RDR configuration mode and data export path policy
Merge pull request !25729 from liangyongxiong/rdr
This commit is contained in:
commit
f30edf5c4b
|
@ -18,7 +18,6 @@
|
|||
#include <fstream>
|
||||
#include "debug/common.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "utils/comm_manager.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
@ -36,13 +35,7 @@ std::optional<std::string> BaseRecorder::GetFileRealPath(const std::string &suff
|
|||
filename = filename_ + delimiter_ + suffix;
|
||||
}
|
||||
}
|
||||
std::string file_path = directory_ + filename;
|
||||
auto context = MsContext::GetInstance();
|
||||
MS_EXCEPTION_IF_NULL(context);
|
||||
auto config_file = context->get_param<std::string>(MS_CTX_ENV_CONFIG_PATH);
|
||||
if (config_file.empty()) {
|
||||
file_path = directory_ + "rank_" + std::to_string(GetRank()) + "/rdr/" + filename;
|
||||
}
|
||||
std::string file_path = directory_ + "rank_" + std::to_string(GetRank()) + "/rdr/" + filename;
|
||||
auto realpath = Common::CreatePrefixPath(file_path);
|
||||
if (!realpath.has_value()) {
|
||||
MS_LOG(ERROR) << "Get real path failed. "
|
||||
|
|
Loading…
Reference in New Issue