From 0c277ac6e997ff0704a65cf450bf35761203f998 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Wed, 27 Feb 2019 11:48:16 +0800 Subject: [PATCH] polish test=develop --- paddle/scripts/paddle_build.sh | 1 + python/paddle/fluid/transpiler/inference_transpiler.py | 4 +++- .../paddle/fluid/transpiler/memory_optimization_transpiler.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 855a8d3565..e1e65d50c4 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -432,6 +432,7 @@ function assert_api_spec_approvals() { fi API_FILES=("paddle/fluid/API.spec" + "python/paddle/fluid/parallel_executor.py" "paddle/fluid/framework/operator.h" "paddle/fluid/framework/tensor.h" "paddle/fluid/framework/lod_tensor.h" diff --git a/python/paddle/fluid/transpiler/inference_transpiler.py b/python/paddle/fluid/transpiler/inference_transpiler.py index fea10d7c3b..8a527e72fb 100644 --- a/python/paddle/fluid/transpiler/inference_transpiler.py +++ b/python/paddle/fluid/transpiler/inference_transpiler.py @@ -51,7 +51,9 @@ class InferenceTranspiler(object): place (Place): inference place scope (Scope|None): inference Scope ''' - sys.stderr.write('InferenceTranspiler is deprecated.\n') + sys.stderr.write("InferenceTranspiler is deprecated since it's not " + "safe. Users should be " + "responsible for constructing the inference program\n") if not isinstance(program, Program): raise TypeError("program should be as Program type") if not isinstance(place, core.CPUPlace) and not isinstance( diff --git a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py index f3c7b3d63b..c434423bae 100755 --- a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py +++ b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py @@ -510,7 +510,8 @@ def memory_optimize(input_program, Returns: None """ - sys.stderr.write('memory_optimize is deprecated.\n') + sys.stderr.write('memory_optimize is deprecated. ' + 'Use CompiledProgram and Executor\n') def to_name_str(var): if isinstance(var, Variable): -- GitLab