fix bug that saved optimal model path in test_analyzer_save_model con…#17555
Merged
lijianshe02 merged 3 commits intoPaddlePaddle:developfrom May 22, 2019
lijianshe02:develop
Merged
fix bug that saved optimal model path in test_analyzer_save_model con…#17555lijianshe02 merged 3 commits intoPaddlePaddle:developfrom lijianshe02:develop
lijianshe02 merged 3 commits intoPaddlePaddle:developfrom
lijianshe02:develop
Conversation
…flict with test_analyzer_small_dam test=develop
luotao1
reviewed
May 22, 2019
| SetConfig(&cfg); | ||
| cfg.SetModel(FLAGS_infer_model + "/__model__", FLAGS_infer_model + "/param"); | ||
| std::string optimModelPath = FLAGS_infer_model + "/saved_optim_model"; | ||
| std::string optimModelPath = FLAGS_infer_model + "/only_for_save_test"; |
Contributor
There was a problem hiding this comment.
这个名字能健壮一点么,不然下次别的单测又拷贝了一份,就会出错了。
能加时间戳么,可以参考 https://github.com/PaddlePaddle/Paddle/pull/17172/files

tensor-tang
reviewed
May 22, 2019
| cur_file_name.substr(0, cur_file_name.find_last_of(".")); | ||
| std::string optimModelPath = | ||
| FLAGS_infer_model + | ||
| saved_folder; // if reuse this code, ensure the path being unique |
Contributor
There was a problem hiding this comment.
这里不要在末尾加这么长的注释,看起来太难看了。直接在前面另起一行。还可以节省一行code。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…flict with test_analyzer_small_dam test=develop