未验证 提交 b90c988c 编写于 作者: W wangzhen38 提交者: GitHub

[RM FLUID] rm fluid_pslib_init (#50549)

* [RM FLUID] rm fluid_pslib_init

* [RM FLUID] for ci

* [RM FLUID] for ci
上级 40cd9552
...@@ -7,7 +7,7 @@ if(WITH_PYTHON) ...@@ -7,7 +7,7 @@ if(WITH_PYTHON)
file(MAKE_DIRECTORY file(MAKE_DIRECTORY
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto) ${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto)
set(PSLIB_PROTO_DSTPATH set(PSLIB_PROTO_DSTPATH
"${PADDLE_SOURCE_DIR}/python/paddle/fluid/incubate/fleet/parameter_server/pslib/" "${PADDLE_SOURCE_DIR}/python/paddle/incubate/fleet/parameter_server/pslib/"
) )
if(NOT WIN32) if(NOT WIN32)
add_custom_command( add_custom_command(
......
...@@ -867,7 +867,7 @@ class InMemoryDataset(DatasetBase): ...@@ -867,7 +867,7 @@ class InMemoryDataset(DatasetBase):
# required: skiptest # required: skiptest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset") dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset")
filelist = ["a.txt", "b.txt"] filelist = ["a.txt", "b.txt"]
dataset.set_filelist(filelist) dataset.set_filelist(filelist)
...@@ -929,7 +929,7 @@ class InMemoryDataset(DatasetBase): ...@@ -929,7 +929,7 @@ class InMemoryDataset(DatasetBase):
# required: skiptest # required: skiptest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset") dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset")
filelist = ["a.txt", "b.txt"] filelist = ["a.txt", "b.txt"]
dataset.set_filelist(filelist) dataset.set_filelist(filelist)
...@@ -993,7 +993,7 @@ class InMemoryDataset(DatasetBase): ...@@ -993,7 +993,7 @@ class InMemoryDataset(DatasetBase):
# required: skiptest # required: skiptest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset") dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset")
filelist = ["a.txt", "b.txt"] filelist = ["a.txt", "b.txt"]
dataset.set_filelist(filelist) dataset.set_filelist(filelist)
...@@ -1037,7 +1037,7 @@ class InMemoryDataset(DatasetBase): ...@@ -1037,7 +1037,7 @@ class InMemoryDataset(DatasetBase):
# required: skiptest # required: skiptest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset") dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset")
filelist = ["a.txt", "b.txt"] filelist = ["a.txt", "b.txt"]
dataset.set_filelist(filelist) dataset.set_filelist(filelist)
...@@ -1084,7 +1084,7 @@ class InMemoryDataset(DatasetBase): ...@@ -1084,7 +1084,7 @@ class InMemoryDataset(DatasetBase):
# required: skiptest # required: skiptest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset") dataset = fluid.DatasetFactory().create_dataset("InMemoryDataset")
graph_config = {"walk_len": 24, graph_config = {"walk_len": 24,
"walk_degree": 10, "walk_degree": 10,
...@@ -1251,9 +1251,9 @@ class QueueDataset(DatasetBase): ...@@ -1251,9 +1251,9 @@ class QueueDataset(DatasetBase):
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
dataset = fluid.DatasetFactory().create_dataset("QueueDataset") dataset = fluid.DatasetFactory().create_dataset("QueueDataset")
dataset.global_shuffle(fleet) #dataset.global_shuffle(fleet)
Raises: Raises:
NotImplementedError: QueueDataset does not support global shuffle NotImplementedError: QueueDataset does not support global shuffle
......
...@@ -2126,7 +2126,7 @@ class Executor: ...@@ -2126,7 +2126,7 @@ class Executor:
assert len(fetch_list) == len(fetch_info) assert len(fetch_list) == len(fetch_info)
compiled = isinstance(program, compiler.CompiledProgram) compiled = isinstance(program, compiler.CompiledProgram)
if is_heter: if is_heter:
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
from paddle.fluid.incubate.fleet.utils.fleet_util import FleetUtil from paddle.fluid.incubate.fleet.utils.fleet_util import FleetUtil
fu = FleetUtil() fu = FleetUtil()
......
...@@ -57,7 +57,7 @@ class FleetUtil: ...@@ -57,7 +57,7 @@ class FleetUtil:
op_maker = core.op_proto_and_checker_maker op_maker = core.op_proto_and_checker_maker
self.op_role_key = op_maker.kOpRoleAttrName() self.op_role_key = op_maker.kOpRoleAttrName()
if mode == "pslib": if mode == "pslib":
from paddle.fluid.incubate.fleet.parameter_server.pslib import ( from paddle.incubate.fleet.parameter_server.pslib import (
fleet as fleet_pslib, fleet as fleet_pslib,
) )
......
...@@ -1185,7 +1185,7 @@ class TestDataset2(unittest.TestCase): ...@@ -1185,7 +1185,7 @@ class TestDataset2(unittest.TestCase):
train_program = fluid.Program() train_program = fluid.Program()
startup_program = fluid.Program() startup_program = fluid.Program()
scope = fluid.Scope() scope = fluid.Scope()
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
with fluid.program_guard(train_program, startup_program): with fluid.program_guard(train_program, startup_program):
slots = ["slot1_ff", "slot2_ff", "slot3_ff", "slot4_ff"] slots = ["slot1_ff", "slot2_ff", "slot3_ff", "slot4_ff"]
...@@ -1316,7 +1316,7 @@ class TestDataset2(unittest.TestCase): ...@@ -1316,7 +1316,7 @@ class TestDataset2(unittest.TestCase):
train_program = fluid.Program() train_program = fluid.Program()
startup_program = fluid.Program() startup_program = fluid.Program()
scope = fluid.Scope() scope = fluid.Scope()
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
with fluid.program_guard(train_program, startup_program): with fluid.program_guard(train_program, startup_program):
slots = ["slot1_ff", "slot2_ff", "slot3_ff", "slot4_ff"] slots = ["slot1_ff", "slot2_ff", "slot3_ff", "slot4_ff"]
......
...@@ -21,12 +21,12 @@ from google.protobuf import text_format ...@@ -21,12 +21,12 @@ from google.protobuf import text_format
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.incubate.fleet.parameter_server.pslib.ps_pb2 as pslib import paddle.incubate.fleet.parameter_server.pslib.ps_pb2 as pslib
from paddle.fluid.incubate.fleet.parameter_server.pslib.node import ( from paddle.fluid.trainer_factory import TrainerFactory
from paddle.incubate.fleet.parameter_server.pslib.node import (
DownpourServer, DownpourServer,
DownpourWorker, DownpourWorker,
) )
from paddle.fluid.trainer_factory import TrainerFactory
cache_path = os.path.expanduser('~/.cache/paddle/dataset') cache_path = os.path.expanduser('~/.cache/paddle/dataset')
......
...@@ -35,7 +35,7 @@ class TestFleet1(unittest.TestCase): ...@@ -35,7 +35,7 @@ class TestFleet1(unittest.TestCase):
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
os.environ["POD_IP"] = "127.0.0.1" os.environ["POD_IP"] = "127.0.0.1"
os.environ["PADDLE_PORT"] = "36001" os.environ["PADDLE_PORT"] = "36001"
......
...@@ -35,7 +35,7 @@ class TestFleet1(unittest.TestCase): ...@@ -35,7 +35,7 @@ class TestFleet1(unittest.TestCase):
"""Test cases for pslib.""" """Test cases for pslib."""
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
os.environ["POD_IP"] = "127.0.0.1" os.environ["POD_IP"] = "127.0.0.1"
os.environ["PADDLE_PORT"] = "36001" os.environ["PADDLE_PORT"] = "36001"
......
...@@ -64,7 +64,7 @@ class TestCloudRoleMaker(unittest.TestCase): ...@@ -64,7 +64,7 @@ class TestCloudRoleMaker(unittest.TestCase):
"""Test cases for pslib.""" """Test cases for pslib."""
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
os.environ["POD_IP"] = "127.0.0.1" os.environ["POD_IP"] = "127.0.0.1"
os.environ["PADDLE_PORT"] = "36001" os.environ["PADDLE_PORT"] = "36001"
......
...@@ -35,7 +35,7 @@ class TestCloudRoleMaker(unittest.TestCase): ...@@ -35,7 +35,7 @@ class TestCloudRoleMaker(unittest.TestCase):
"""Test cases for pslib.""" """Test cases for pslib."""
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
os.environ["POD_IP"] = "127.0.0.1" os.environ["POD_IP"] = "127.0.0.1"
os.environ["PADDLE_PORT"] = "36001" os.environ["PADDLE_PORT"] = "36001"
......
...@@ -35,7 +35,7 @@ class TestFleet1(unittest.TestCase): ...@@ -35,7 +35,7 @@ class TestFleet1(unittest.TestCase):
"""Test cases for pslib.""" """Test cases for pslib."""
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.incubate.fleet.parameter_server.pslib import fleet
os.environ["POD_IP"] = "127.0.0.1" os.environ["POD_IP"] = "127.0.0.1"
os.environ["PADDLE_PORT"] = "36001" os.environ["PADDLE_PORT"] = "36001"
......
...@@ -1230,7 +1230,7 @@ class DownpourOptimizer(DistributedOptimizer): ...@@ -1230,7 +1230,7 @@ class DownpourOptimizer(DistributedOptimizer):
fleet._main_programs = programs fleet._main_programs = programs
fleet._scopes = scopes fleet._scopes = scopes
if opt_info["use_ps_gpu"]: if opt_info["use_ps_gpu"]:
from paddle.fluid.transpiler.collective import MultiThread from paddle.distributed.transpiler.collective import MultiThread
# check start program # check start program
if program_mode not in [ if program_mode not in [
......
...@@ -406,7 +406,6 @@ packages=['paddle', ...@@ -406,7 +406,6 @@ packages=['paddle',
'paddle.fluid.incubate.fleet.base', 'paddle.fluid.incubate.fleet.base',
'paddle.fluid.incubate.fleet.parameter_server', 'paddle.fluid.incubate.fleet.parameter_server',
'paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler', 'paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler',
'paddle.fluid.incubate.fleet.parameter_server.pslib',
'paddle.fluid.incubate.fleet.parameter_server.ir', 'paddle.fluid.incubate.fleet.parameter_server.ir',
'paddle.fluid.incubate.fleet.collective', 'paddle.fluid.incubate.fleet.collective',
'paddle.fluid.incubate.fleet.utils', 'paddle.fluid.incubate.fleet.utils',
...@@ -438,6 +437,7 @@ packages=['paddle', ...@@ -438,6 +437,7 @@ packages=['paddle',
'paddle.incubate.distributed.models.moe', 'paddle.incubate.distributed.models.moe',
'paddle.incubate.distributed.models.moe.gate', 'paddle.incubate.distributed.models.moe.gate',
'paddle.incubate.fleet.parameter_server.distribute_transpiler', 'paddle.incubate.fleet.parameter_server.distribute_transpiler',
'paddle.incubate.fleet.parameter_server.pslib',
'paddle.quantization', 'paddle.quantization',
'paddle.quantization.quanters', 'paddle.quantization.quanters',
'paddle.quantization.observers', 'paddle.quantization.observers',
...@@ -594,7 +594,7 @@ if '${WITH_CINN}' == 'ON': ...@@ -594,7 +594,7 @@ if '${WITH_CINN}' == 'ON':
if '${WITH_PSLIB}' == 'ON': if '${WITH_PSLIB}' == 'ON':
shutil.copy('${PSLIB_LIB}', libs_path) shutil.copy('${PSLIB_LIB}', libs_path)
if os.path.exists('${PSLIB_VERSION_PY}'): if os.path.exists('${PSLIB_VERSION_PY}'):
shutil.copy('${PSLIB_VERSION_PY}', '${PADDLE_BINARY_DIR}/python/paddle/fluid/incubate/fleet/parameter_server/pslib/') shutil.copy('${PSLIB_VERSION_PY}', '${PADDLE_BINARY_DIR}/python/paddle/incubate/fleet/parameter_server/pslib/')
package_data['paddle.libs'] += ['libps' + ext_name] package_data['paddle.libs'] += ['libps' + ext_name]
if '${WITH_MKLDNN}' == 'ON': if '${WITH_MKLDNN}' == 'ON':
......
...@@ -963,7 +963,7 @@ def get_package_data_and_package_dir(): ...@@ -963,7 +963,7 @@ def get_package_data_and_package_dir():
shutil.copy( shutil.copy(
env_dict.get("PSLIB_VERSION_PY"), env_dict.get("PSLIB_VERSION_PY"),
paddle_binary_dir paddle_binary_dir
+ '/python/paddle/fluid/incubate/fleet/parameter_server/pslib/', + '/python/paddle/incubate/fleet/parameter_server/pslib/',
) )
package_data['paddle.libs'] += ['libps' + ext_suffix] package_data['paddle.libs'] += ['libps' + ext_suffix]
if env_dict.get("WITH_MKLDNN") == 'ON': if env_dict.get("WITH_MKLDNN") == 'ON':
...@@ -1293,7 +1293,6 @@ def get_setup_parameters(): ...@@ -1293,7 +1293,6 @@ def get_setup_parameters():
'paddle.fluid.incubate.fleet.base', 'paddle.fluid.incubate.fleet.base',
'paddle.fluid.incubate.fleet.parameter_server', 'paddle.fluid.incubate.fleet.parameter_server',
'paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler', 'paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler',
'paddle.fluid.incubate.fleet.parameter_server.pslib',
'paddle.fluid.incubate.fleet.parameter_server.ir', 'paddle.fluid.incubate.fleet.parameter_server.ir',
'paddle.fluid.incubate.fleet.collective', 'paddle.fluid.incubate.fleet.collective',
'paddle.fluid.incubate.fleet.utils', 'paddle.fluid.incubate.fleet.utils',
...@@ -1325,6 +1324,7 @@ def get_setup_parameters(): ...@@ -1325,6 +1324,7 @@ def get_setup_parameters():
'paddle.incubate.distributed.models.moe', 'paddle.incubate.distributed.models.moe',
'paddle.incubate.distributed.models.moe.gate', 'paddle.incubate.distributed.models.moe.gate',
'paddle.incubate.fleet.parameter_server.distribute_transpiler', 'paddle.incubate.fleet.parameter_server.distribute_transpiler',
'paddle.incubate.fleet.parameter_server.pslib',
'paddle.quantization', 'paddle.quantization',
'paddle.quantization.quanters', 'paddle.quantization.quanters',
'paddle.quantization.observers', 'paddle.quantization.observers',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册