Skip to content

Commit

Permalink
params file will not be a nessary file (#38579)
Browse files Browse the repository at this point in the history
  • Loading branch information
JZZ-NOTE committed Jan 6, 2022
1 parent 1e8432f commit 5bb50a4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions paddle/fluid/inference/api/analysis_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,6 @@ void AnalysisPredictor::PrepareArgument() {
if (!config_.model_dir().empty()) {
argument_.SetModelDir(config_.model_dir());
} else {
PADDLE_ENFORCE_EQ(config_.params_file().empty(), false,
platform::errors::PreconditionNotMet(
"Either model_dir or param_file should be set."));
PADDLE_ENFORCE_EQ(config_.prog_file().empty(), false,
platform::errors::PreconditionNotMet(
"Either model_dir or prog_file should be set."));
Expand Down Expand Up @@ -1089,7 +1086,7 @@ bool AnalysisPredictor::LoadProgramDesc() {
std::string filename;
if (!config_.model_dir().empty()) {
filename = config_.model_dir() + "/__model__";
} else if (!config_.prog_file().empty() && !config_.params_file().empty()) {
} else if (!config_.prog_file().empty()) {
// All parameters are saved in a single file.
// The file names should be consistent with that used
// in Python API `fluid.io.save_inference_model`.
Expand Down

1 comment on commit 5bb50a4

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.