From df6fdd2d0b2c138316d40a519b9ef6078fe04a20 Mon Sep 17 00:00:00 2001 From: Alexander Borzunov Date: Tue, 8 Aug 2023 04:59:55 +0400 Subject: [PATCH] Force using --new_swarm instead of empty --initial_peers (#451) This prohibits passing `--initial_peers` without arguments, since it's likely to be a side-effect from `--initial_peers $INITIAL_PEERS` with the env var not set. Users should use `--new_swarm` for that, as explained in the private swarm tutorial. --- src/petals/cli/run_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/petals/cli/run_server.py b/src/petals/cli/run_server.py index d4fc999..c82ff44 100644 --- a/src/petals/cli/run_server.py +++ b/src/petals/cli/run_server.py @@ -122,7 +122,7 @@ def main(): help="Timeout (in seconds) for waiting the next step's inputs inside an inference session") group = parser.add_mutually_exclusive_group() - group.add_argument('--initial_peers', type=str, nargs='*', required=False, default=PUBLIC_INITIAL_PEERS, + group.add_argument('--initial_peers', type=str, nargs='+', required=False, default=PUBLIC_INITIAL_PEERS, help='Multiaddrs of one or more DHT peers from the target swarm. Default: connects to the public swarm') group.add_argument('--new_swarm', action='store_true', help='Start a new private swarm (i.e., do not connect to any initial peers)')