Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用多卡微调模型时报错torch.distributed.elastic.multiprocessing.api: [ERROR] #447

Open
menghan1124 opened this issue Jul 26, 2024 · 1 comment

Comments

@menghan1124
Copy link

(yolo-world) menghan@AA:~/YOLO-World$ tools/dist_train.sh configs/finetune_coco/yolo_world_v2_l_vlpan_bn_sgd_1e-3_40e_8gpus_finetune_coco.py 7 --amp

/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/launch.py:181: FutureWarning: The module torch.distributed.launch is deprecated
and will be removed in future. Use torchrun.
Note that --use-env is set by default in torchrun.
If your script expects --local-rank argument to be set, please
change it to read from os.environ['LOCAL_RANK'] instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility for
further instructions

warnings.warn(
[2024-07-26 22:39:32,318] torch.distributed.run: [WARNING]
[2024-07-26 22:39:32,318] torch.distributed.run: [WARNING] *****************************************
[2024-07-26 22:39:32,318] torch.distributed.run: [WARNING] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
[2024-07-26 22:39:32,318] torch.distributed.run: [WARNING] *****************************************
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
train.py: error: unrecognized arguments: --local-rank=0
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
train.py: error: unrecognized arguments: --local-rank=5
train.py: error: unrecognized arguments: --local-rank=4
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
train.py: error: unrecognized arguments: --local-rank=3
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
train.py: error: unrecognized arguments: --local-rank=1
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
train.py: error: unrecognized arguments: --local-rank=2
usage: train.py [-h] [--work-dir WORK_DIR] [--amp] [--resume [RESUME]] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}] [--local_rank LOCAL_RANK] config
train.py: error: unrecognized arguments: --local-rank=6
[2024-07-26 22:39:37,391] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: 2) local_rank: 0 (pid: 1853771) of binary: /home/menghan/miniconda3/envs/yolo-world/bin/python
Traceback (most recent call last):
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/launch.py", line 196, in
main()
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/launch.py", line 192, in main
launch(args)
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/launch.py", line 177, in launch
run(args)
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/run.py", line 797, in run
elastic_launch(
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 134, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/menghan/miniconda3/envs/yolo-world/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

tools/train.py FAILED

Failures:
[1]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 1 (local_rank: 1)
exitcode : 2 (pid: 1853772)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[2]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 2 (local_rank: 2)
exitcode : 2 (pid: 1853773)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[3]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 3 (local_rank: 3)
exitcode : 2 (pid: 1853774)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[4]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 4 (local_rank: 4)
exitcode : 2 (pid: 1853775)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[5]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 5 (local_rank: 5)
exitcode : 2 (pid: 1853776)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[6]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 6 (local_rank: 6)
exitcode : 2 (pid: 1853777)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

Root Cause (first observed failure):
[0]:
time : 2024-07-26_22:39:37
host : NSGPU68103
rank : 0 (local_rank: 0)
exitcode : 2 (pid: 1853771)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

@imatif17
Copy link

Hi! Did you solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants