|
@@ -41,9 +41,8 @@ class Server(threading.Thread):
|
|
- processes incoming forward/backward requests via Runtime (created by the server)
|
|
- processes incoming forward/backward requests via Runtime (created by the server)
|
|
- publishes updates to expert status every :update_period: seconds
|
|
- publishes updates to expert status every :update_period: seconds
|
|
|
|
|
|
- :type dht: an instance of hivemind.DHT.
|
|
|
|
|
|
+ :type dht: an instance of hivemind.DHT. Server will use DHT for all network interactions.
|
|
:param expert_backends: dict{expert uid (str) : ExpertBackend} for all expert hosted by this server.
|
|
:param expert_backends: dict{expert uid (str) : ExpertBackend} for all expert hosted by this server.
|
|
- :param listen_on: server's dht address that determines how it can be accessed. Address and (optional) port
|
|
|
|
:param num_connection_handlers: maximum number of simultaneous requests. Please note that the default value of 1
|
|
:param num_connection_handlers: maximum number of simultaneous requests. Please note that the default value of 1
|
|
if too small for normal functioning, we recommend 4 handlers per expert backend.
|
|
if too small for normal functioning, we recommend 4 handlers per expert backend.
|
|
:param update_period: how often will server attempt to publish its state (i.e. experts) to the DHT;
|
|
:param update_period: how often will server attempt to publish its state (i.e. experts) to the DHT;
|
|
@@ -112,7 +111,7 @@ class Server(threading.Thread):
|
|
) -> Server:
|
|
) -> Server:
|
|
"""
|
|
"""
|
|
Instantiate a server with several identical experts. See argparse comments below for details
|
|
Instantiate a server with several identical experts. See argparse comments below for details
|
|
- :param listen_on: network interface with address and (optional) port, e.g. "127.0.0.1:1337" or "[::]:80"
|
|
|
|
|
|
+
|
|
:param num_experts: run this many identical experts
|
|
:param num_experts: run this many identical experts
|
|
:param expert_pattern: a string pattern or a list of expert uids, example: myprefix.[0:32].[0:256]\
|
|
:param expert_pattern: a string pattern or a list of expert uids, example: myprefix.[0:32].[0:256]\
|
|
means "sample random experts between myprefix.0.0 and myprefix.255.255;
|
|
means "sample random experts between myprefix.0.0 and myprefix.255.255;
|