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

AssertionError | The module torch.distributed.launch is deprecated and will be removed in future. #1

Open
LiuxinYLX opened this issue May 31, 2024 · 0 comments

Comments

@LiuxinYLX
Copy link

My command:

tools/dist_test.sh configs/config_wormswin_mmdetection.py ../Documents/Stage/worm-swin-main/synthetic_csb-1_epoch_36.pth 0 --eval bbox segm --out outputs/resultat.pkl

My errors:
/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/launch.py:183: 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(
Traceback (most recent call last):
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/launch.py", line 198, in
main()
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/launch.py", line 194, in main
launch(args)
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/launch.py", line 179, in launch
run(args)
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/run.py", line 870, in run
elastic_launch(
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 132, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 230, in launch_agent
spec = WorkerSpec(
File "", line 14, in init
File "/home/liuxinyang/miniconda3/envs/openmmlab/lib/python3.8/site-packages/torch/distributed/elastic/agent/server/api.py", line 94, in post_init
assert self.local_world_size > 0
AssertionError

My objective: I want to test my own photos but it doesn't work. I also tried :
torchrun --standalone --nnodes=1 --nproc_per_node=1 tools/test.py configs/config_wormswin_mmdetection.py ../Documents/Stage/worm-swin-main/synthetic_csb-1_epoch_36.pth --eval bbox segm --out outputs/resultat.pkl

But it doesn't work either. :( Could you help me, please? TT

@LiuxinYLX LiuxinYLX changed the title AssertionError | he module torch.distributed.launch is deprecated and will be removed in future. AssertionError | The module torch.distributed.launch is deprecated and will be removed in future. May 31, 2024
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

1 participant