Explorar o código

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.
Alexander Borzunov %!s(int64=2) %!d(string=hai) anos
pai
achega
df6fdd2d0b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/petals/cli/run_server.py

+ 1 - 1
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)')