示例#1
0
def _start_kv_server(port, http_server_d, size):
    from paddle.distributed.fleet.utils.http_server import KVServer
    http_server = KVServer(int(port), size=size)
    http_server.start()
    wait_seconds = 3
    while http_server_d.get("running", False) or not http_server.should_stop():
        time.sleep(wait_seconds)
    http_server.stop()
示例#2
0
 def __start_kv_server(http_server_d, size_d):
     print("start http_server: {}, {}".format(port, size_d))
     from paddle.distributed.fleet.utils.http_server import KVServer
     http_server = KVServer(port, size_d)
     http_server.start()
     wait_seconds = 5
     while http_server_d.get("running",
                             False) or not http_server.should_stop():
         time.sleep(wait_seconds)
     http_server.stop()