diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index f969dee45a3d4f5218aee8d05dbac31850b1f5de..aeb887869cfd131e86d389e1e16bc6c11d84634f 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -432,8 +432,8 @@ function assert_api_spec_approvals() { BRANCH="develop" fi - API_FILES=("cmake/external" - "paddle/fluid/API.spec" + 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/parallel_executor.py b/python/paddle/fluid/parallel_executor.py index 889156ff74d6eb1108b23f365f1a081c5b8222b2..fa8d5ef5d30609eb6ba75bac5de9dc7164672bd7 100644 --- a/python/paddle/fluid/parallel_executor.py +++ b/python/paddle/fluid/parallel_executor.py @@ -92,6 +92,11 @@ class ParallelExecutor(object): num_trainers=1, trainer_id=0, scope=None): + sys.stderr.write( + 'ParallelExecutor is deprecated. ' + 'Please use CompiledProgram and Executor. CompiledProgram ' + 'is a central place for optimization and Executor is the ' + 'unified executor. Example can be found in compiler.py.\n') # step1: get places, the places are used in run too. self._places = [] if use_cuda: diff --git a/python/paddle/fluid/transpiler/inference_transpiler.py b/python/paddle/fluid/transpiler/inference_transpiler.py index cc7f5ec90c26c87b7c5514c900e853be9e16d6eb..8a527e72fb9ac806254d2c055fc283c938cc55b4 100644 --- a/python/paddle/fluid/transpiler/inference_transpiler.py +++ b/python/paddle/fluid/transpiler/inference_transpiler.py @@ -15,6 +15,7 @@ from __future__ import print_function import os +import sys import numpy as np from .. import core from ..framework import Program @@ -50,6 +51,9 @@ class InferenceTranspiler(object): place (Place): inference place scope (Scope|None): inference Scope ''' + 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 ee8cde441ffc63ebd923bd579a7f44d1e2218cf0..c434423bae76c2ebdd7bdeb164350d6ec66621c8 100755 --- a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py +++ b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py @@ -15,6 +15,7 @@ from __future__ import print_function import six +import sys from collections import defaultdict, MutableSet from .. import core from ... import compat as cpt @@ -509,6 +510,8 @@ def memory_optimize(input_program, Returns: None """ + sys.stderr.write('memory_optimize is deprecated. ' + 'Use CompiledProgram and Executor\n') def to_name_str(var): if isinstance(var, Variable):