fix API.spec

test=develop
revert-16555-model_data_cryption_link_all_lib
dongdaxiang 6 years ago
parent 720647e17f
commit ade9337486

@ -1,17 +0,0 @@
class P2PRoleMakers(object):
def __init__(self):
from mpi4py import MPI
self.comm = MPI.COMM_WORLD
self.MPI = MPI
def get_endpoints(self, port_start):
rank = self.comm.Get_rank()
size = self.comm.Get_size()
import socket
local_ip = socket.gethostbyname(socket.gethostname())
hostname = socket.gethostname()
all_ips = self.comm.allgather(local_ip)
all_ports = [str(port_start + rank) for ]
return all_ports

File diff suppressed because one or more lines are too long

@ -56,7 +56,6 @@ class Executor {
explicit Executor(const platform::Place& place);
explicit Executor(Scope* scope, const platform::Place& place);
/*
* Close this Executor.
* Calling this method will send complete messages to all pserver instances.

@ -86,7 +86,7 @@ class AsyncExecutor(object):
>>> async_executor = fluid.AsyncExecutor(place)
Args:
place(Place): CPUPlace or GPUPlace.
place(Place): CPUPlace only
run_mode(str): default is empty string.
"""
if place is None:

@ -703,6 +703,9 @@ class Executor(object):
exe.infer_from_dataset(program=fluid.default_main_program(),
dataset=dataset)
"""
if self.place == paddle.fluid.CUDAPlace():
raise RuntimeError("infer_from_dataset is verified on CPUPlace"
"We will open CUDAPlace in the future")
scope, trainer = self._prepare_trainer(
program=program,
@ -776,6 +779,9 @@ class Executor(object):
dataset=dataset)
"""
if self.place == paddle.fluid.CUDAPlace():
raise RuntimeError("train_from_dataset is verified on CPUPlace"
"We will open CUDAPlace in the future")
scope, trainer = self._prepare_trainer(
program=program,

Loading…
Cancel
Save