torch.distributed.elastic.multiprocessing.redirects: [WARNING] NOTE: Redirects are currently not sup

文章解释了在使用多GPU训练时,如何避免警告--num_processes默认设置为2导致的意外多GPU启用。建议在Windows或MacOS上使用单GPU,通过设置`--num_processes=1`来明确指定。同时提及了gloo作为多卡训练的特定backend选项。
Qwen3-32B-Chat 私有部署镜像 | RTX4090D 24G 显存 CUDA12.4 优化版

本镜像基于 RTX 4090D 24GB 显存 + CUDA 12.4 + 驱动 550.90.07 深度优化,内置完整运行环境与 Qwen3-32B 模型依赖,开箱即用。

目录

If this was unintended please pass in `--num_processes=1`什么意思

设置gpu_id

设置多显卡格式:


报错:

The following values were not passed to `accelerate launch` and had defaults used instead:
	`--num_processes` was set to a value of `2`
		More than one GPU was found, enabling multi-GPU training.
		If this was unintended please pass in `--num_processes=1`.
	`--num_machines` was set to a value of `1`
	`--dynamo_backend` was set to a value of `'no'`
To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.

torch.distributed.elastic.multiprocessing.redirects: [WARNING] NOTE: Redirects are currently not supported in Windows or MacOs.

If this was unintended please pass in `--num_processes=1`什么意思

ChatGPT回答

这个警告指出某些参数未被明确传递,因此采用了默认值。在警告中指出,如果你意图是使用单个 GPU 进行训练,你可以传递 --num_processes=1 这个参数来指定只使用一个进程。通常情况下,如果系统中有多个 GPU,而你只想使用其中一个进行训练,就需要明确指定使用单个进程(即 --num_processes=1)。

这个警告的目的是提醒你可能意外地启用了多 GPU 训练,因为系统检测到有多个 GPU,但你没有明确地指定只使用一个 GPU。如果你确实只想使用一个 GPU 进行训练,就需要传递 --num_processes=1 这个参数来明确设置。

设置gpu_id

    gpu_ids = getattr(args, "gpu_ids", "all")
    # args.gpu_ids=gpu_ids='0,1'
    if gpu_ids != "all" and args.gpu_ids is not None:

设置多卡训练格式 解决问题:

gloo

位置:Lib\site-packages\accelerate\state.py

            elif int(os.environ.get("LOCAL_RANK", -1)) != -1 and not cpu and torch.cuda.is_available():
                self.distributed_type = DistributedType.MULTI_GPU
                if not torch.distributed.is_initialized():
                    self.backend = kwargs.pop("backend", "nccl")
                    # Special case for `TrainingArguments`, where `backend` will be `None`
                    if self.backend is None:
                        self.backend = "gloo"

您可能感兴趣的与本文相关的镜像

Qwen3-32B-Chat 私有部署镜像 | RTX4090D 24G 显存 CUDA12.4 优化版

Qwen3-32B-Chat 私有部署镜像 | RTX4090D 24G 显存 CUDA12.4 优化版

Qwen
文本生成
Qwen3

本镜像基于 RTX 4090D 24GB 显存 + CUDA 12.4 + 驱动 550.90.07 深度优化,内置完整运行环境与 Qwen3-32B 模型依赖,开箱即用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI算法网奇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值