Skip to content

Commit b7a64e8

Browse files
committed
fix confilts
1 parent 4e4f952 commit b7a64e8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

paddle/fluid/inference/tests/api/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ inference_analysis_test(test_analyzer_text_classification SRCS analyzer_text_cla
6060
set(OCR_MODEL_URL "http://paddlemodels.cdn.bcebos.com/inference-vis-demos%2Focr.tar.gz")
6161
set(OCR_INSTALL_DIR "${THIRD_PARTY_PATH}/inference_demo/ocr")
6262
if (NOT EXISTS ${OCR_INSTALL_DIR} AND WITH_INFERENCE)
63-
inference_download_and_uncompress(${OCR_INSTALL_DIR} ${OCR_MODEL_URL})
63+
get_filename_component(filename ${OCR_MODEL_URL} NAME)
64+
message(STATUS "Download inference test stuff ${filename} from ${OCR_MODEL_URL}")
65+
execute_process(COMMAND bash -c "mkdir -p ${OCR_INSTALL_DIR}")
66+
execute_process(COMMAND bash -c "cd ${OCR_INSTALL_DIR} && wget -q ${OCR_MODEL_URL}")
67+
execute_process(COMMAND bash -c "cd ${OCR_INSTALL_DIR} && tar xzf ${filename}")
68+
message(STATUS "finish downloading ${filename}")
6469
endif()
6570
inference_analysis_test(test_analyzer_ocr SRCS analyzer_vis_tester.cc
6671
EXTRA_DEPS paddle_inference_api paddle_fluid_api ir_pass_manager analysis_predictor

paddle/fluid/inference/tests/api/analyzer_lac_tester.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ const int64_t lac_ref_data[] = {24, 25, 25, 25, 38, 30, 31, 14, 15, 44, 24, 25,
110110

111111
void TestLACPrediction(const std::string &model_path,
112112
const std::string &data_file, const int batch_size,
113-
const int repeat, bool test_all_data,
114-
bool use_analysis = false) {
113+
const int repeat, bool use_analysis = false) {
115114
AnalysisConfig cfg;
116115
cfg.model_dir = model_path;
117116
cfg.use_gpu = false;
@@ -199,13 +198,13 @@ void TestLACPrediction(const std::string &model_path,
199198
TEST(Analyzer_LAC, native) {
200199
LOG(INFO) << "LAC with native";
201200
TestLACPrediction(FLAGS_infer_model, FLAGS_infer_data, FLAGS_batch_size,
202-
FLAGS_repeat, FLAGS_test_all_data);
201+
FLAGS_repeat);
203202
}
204203

205204
TEST(Analyzer_LAC, analysis) {
206205
LOG(INFO) << "LAC with analysis";
207206
TestLACPrediction(FLAGS_infer_model, FLAGS_infer_data, FLAGS_batch_size,
208-
FLAGS_repeat, FLAGS_test_all_data, true);
207+
FLAGS_repeat, true);
209208
}
210209

211210
} // namespace analysis

0 commit comments

Comments
 (0)