Merge pull request #15948 from panyx0718/api2

Add deprecation warning
revert-15774-anakin_subgraph_engine
Xin Pan 6 years ago committed by GitHub
commit a63e2a0a4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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"

@ -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:

@ -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(

@ -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):

Loading…
Cancel
Save