Hi, I should have provided more resources in my previous response, my apologies. Here is the reading about torch.distributed.run and the arguments it supports (Elastic Launch — PyTorch master documentation 2). It is a superset of the arguments of torch.distributed.launch but also includes fault tolerance provided by TorchElastic Torch Distributed Elastic — PyTorch master documentation 1.
Regarding LaunchConfig and elastic_launch, they are not yet public APIs and are subject to change. By default it uses an etcd backend which is a third-party distributed key-value store which is why I believe you are hitting your errors. However, if you don’t want third party dependencies, you can use an internally built backend for rendezvous. Here is an example for you:
test.py
from torch.distributed.launcher.api import LaunchConfig, elastic_launch
import os

def my_process(args):
    env_variables = [
        "RANK",
        "WORLD_SIZE",
        "MASTER_ADDR",
        "MASTER_PORT",
        "TORCHELASTIC_MAX_RESTARTS",
        # etc...
    ]
    for env_var in env_variables:
        print(f"{env_var}: {os.environ.get(env_var)}")
    print(f"here are my own args: {args}")

if __name__ == "__main__":
    config = LaunchConfig(min_nodes=1, max_nodes=1, nproc_per_node=2, rdzv_endpoint="localhost:0", rdzv_backend="c10d")
    outputs = elastic_launch(config, my_process)("my args")

Then just run python test.py
The output looks something like (along with some torchelastic logging and warnings):
RANK: 1
WORLD_SIZE: 2
MASTER_ADDR: <my machine>
MASTER_PORT: 51217
TORCHELASTIC_MAX_RESTARTS: 3
here are my own args: my args
RANK: 0
WORLD_SIZE: 2
MASTER_ADDR: <my machine>
MASTER_PORT: 51217
TORCHELASTIC_MAX_RESTARTS: 3
here are my own args: my args