def create_tcp_url(self): addr = DEFAULT_HOSTNAME port = common.find_free_port() url = "tcp://%s:%d?world_size=%d" % (addr, port, 1) return url
def _create_tcp_store(): addr = "localhost" port = common.find_free_port() timeout = timedelta(minutes=5) timeout_millisecond = int(timeout / timedelta(milliseconds=1)) return torch.classes.dist_c10d.TCPStore(addr, port, 1, True, timeout_millisecond)