constant.cpp 2.6 KB
Newer Older
W
wangguibao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

G
guru4elephant 已提交
15
#include "core/predictor/common/constant.h"
W
wangguibao 已提交
16 17 18 19 20 21 22 23 24 25

namespace baidu {
namespace paddle_serving {
namespace predictor {

DEFINE_bool(use_parallel_infer_service, false, "");
DEFINE_int32(el_log_level, 16, "");
DEFINE_int32(idle_timeout_s, 16, "");
DEFINE_int32(port, 8010, "");
DEFINE_string(workflow_path, "./conf", "");
W
wangguibao 已提交
26
DEFINE_string(workflow_file, "workflow.prototxt", "");
W
wangguibao 已提交
27
DEFINE_string(inferservice_path, "./conf", "");
W
wangguibao 已提交
28
DEFINE_string(inferservice_file, "service.prototxt", "");
W
wangguibao 已提交
29 30 31
DEFINE_string(logger_path, "./conf", "");
DEFINE_string(logger_file, "log.conf", "");
DEFINE_string(resource_path, "./conf", "");
W
wangguibao 已提交
32
DEFINE_string(resource_file, "resource.prototxt", "");
W
wangguibao 已提交
33 34 35 36 37 38 39
DEFINE_int32(max_concurrency,
             0,
             "Limit of request processing in parallel, 0: unlimited");
DEFINE_int32(
    num_threads,
    0,
    "Number of pthreads that server runs on, not change if this value <= 0");
W
wangguibao 已提交
40 41
DEFINE_int32(reload_interval_s, 10, "");
DEFINE_bool(enable_model_toolkit, false, "enable model toolkit");
W
wangguibao 已提交
42
DEFINE_string(enable_protocol_list, "baidu_std", "set protocol list");
X
xulongteng 已提交
43
DEFINE_bool(enable_cube, false, "enable cube");
G
guru4elephant 已提交
44 45 46
DEFINE_string(general_model_path, "./conf", "");
DEFINE_string(general_model_file, "general_model.prototxt", "");
DEFINE_bool(enable_general_model, false, "enable general model");
W
wangguibao 已提交
47

W
wangguibao 已提交
48
const char* START_OP_NAME = "startup_op";
W
wangguibao 已提交
49 50 51
}  // namespace predictor
}  // namespace paddle_serving
}  // namespace baidu
W
wangguibao 已提交
52

W
wangguibao 已提交
53 54 55 56 57 58 59 60 61
// Baidurpc
BAIDU_REGISTER_ERRNO(baidu::paddle_serving::predictor::ERR_INTERNAL_FAILURE,
                     "Paddle Serving Framework Internal Error.");
BAIDU_REGISTER_ERRNO(baidu::paddle_serving::predictor::ERR_MEM_ALLOC_FAILURE,
                     "Paddle Serving Memory Alloc Error.");
BAIDU_REGISTER_ERRNO(baidu::paddle_serving::predictor::ERR_OVERFLOW_FAILURE,
                     "Paddle Serving Array Overflow Error.");
BAIDU_REGISTER_ERRNO(baidu::paddle_serving::predictor::ERR_OP_INFER_FAILURE,
                     "Paddle Serving Op Inference Error.");