未验证 提交 63bfe0b9 编写于 作者: G gongweibao 提交者: GitHub

Fix the default value bug of started port in launch.py. (#23531)

上级 4cbed3a3
......@@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from utils import get_cluster, logger
import os
import paddle
from paddle.distributed.utils import get_cluster, logger
def get_cloud_cluster(args_node_ips, args_node_ip, args_port, selected_gpus):
......
......@@ -154,10 +154,12 @@ def get_cluster_from_args(args, selected_gpus):
if free_ports is not None:
free_ports = list(free_ports)
else:
started_port = 6070
if args.started_port is not None:
started_port = args.started_port
free_ports = [
x
for x in range(args.started_port, args.started_port + len(
selected_gpus))
x for x in range(started_port, started_port + len(selected_gpus))
]
return get_cluster(node_ips, node_ip, free_ports, selected_gpus)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册