$ tools/dist_test.sh configs/swin/upernet_swin_small_patch4_window7_512x512_160k_cityscapes.py ./work_dirs/upernet_swin_small_patch4_window7_512x512_160k_cityscapes/latest.pth 2 --aug-test --eval mIoU
/home/shaosen/miniconda3/envs/swinseg/lib/python3.7/site-packages/torch/distributed/launch.py:164: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  "The module torch.distributed.launch is deprecated "
The module torch.distributed.launch is deprecated and going to be removed in future.Migrate to torch.distributed.run
*****************************************
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. 
*****************************************
WARNING:torch.distributed.run:--use_env is deprecated and will be removed in future releases.
 Please read local_rank from `os.environ('LOCAL_RANK')` instead.
INFO:torch.distributed.launcher.api:Starting elastic_operator with launch configs:
  entrypoint       : tools/test.py
  min_nodes        : 1
  max_nodes        : 1
  nproc_per_node   : 2
  run_id           : none
  rdzv_backend     : static
  rdzv_endpoint    : 127.0.0.1:29500
  rdzv_configs     : {'rank': 0, 'timeout': 900}
  max_restarts     : 3
  monitor_interval : 5
  log_dir          : None
  metrics_cfg      : {}

INFO:torch.distributed.elastic.agent.server.local_elastic_agent:log directory set to: /tmp/torchelastic_s8etrxj7/none_75ksij0y
INFO:torch.distributed.elastic.agent.server.api:[default] starting workers for entrypoint: python
INFO:torch.distributed.elastic.agent.server.api:[default] Rendezvous'ing worker group
/home/shaosen/miniconda3/envs/swinseg/lib/python3.7/site-packages/torch/distributed/elastic/utils/store.py:53: FutureWarning: This is an experimental API and will be changed in future.
  "This is an experimental API and will be changed in future.", FutureWarning
INFO:torch.distributed.elastic.agent.server.api:[default] Rendezvous complete for workers. Result:
  restart_count=0
  master_addr=127.0.0.1
  master_port=29500
  group_rank=0
  group_world_size=1
  local_ranks=[0, 1]
  role_ranks=[0, 1]
  global_ranks=[0, 1]
  role_world_sizes=[2, 2]
  global_world_sizes=[2, 2]

INFO:torch.distributed.elastic.agent.server.api:[default] Starting worker group
INFO:torch.distributed.elastic.multiprocessing:Setting worker0 reply file to: /tmp/torchelastic_s8etrxj7/none_75ksij0y/attempt_0/0/error.json
INFO:torch.distributed.elastic.multiprocessing:Setting worker1 reply file to: /tmp/torchelastic_s8etrxj7/none_75ksij0y/attempt_0/1/error.json
2024-05-12 13:20:48,381 - mmseg - INFO - Loaded 500 images
Use load_from_local loader
Use load_from_local loader
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 500/500, 0.5 task/s, elapsed: 1084s, ETA:     0sper class results:

+---------------+-------+-------+
| Class         | IoU   | Acc   |
+---------------+-------+-------+
| road          | 98.71 | 99.33 |
| sidewalk      | 88.65 | 94.0  |
| building      | 93.84 | 97.35 |
| wall          | 61.59 | 67.69 |
| fence         | 67.53 | 75.46 |
| pole          | 71.48 | 80.72 |
| traffic light | 75.93 | 85.65 |
| traffic sign  | 84.58 | 89.73 |
| vegetation    | 93.58 | 97.2  |
| terrain       | 67.52 | 73.99 |
| sky           | 95.76 | 98.65 |
| person        | 85.7  | 93.88 |
| rider         | 68.29 | 79.43 |
| car           | 96.17 | 98.44 |
| truck         | 85.25 | 88.94 |
| bus           | 92.8  | 95.7  |
| train         | 83.03 | 85.71 |
| motorcycle    | 75.98 | 83.65 |
| bicycle       | 81.95 | 91.38 |
+---------------+-------+-------+
Summary:

+--------+-------+-------+-------+
| Scope  | mIoU  | mAcc  | aAcc  |
+--------+-------+-------+-------+
| global | 82.54 | 88.26 | 96.91 |
+--------+-------+-------+-------+
INFO:torch.distributed.elastic.agent.server.api:[default] worker group successfully finished. Waiting 300 seconds for other agents to finish.
INFO:torch.distributed.elastic.agent.server.api:Local worker group finished (SUCCEEDED). Waiting 300 seconds for other agents to finish
/home/shaosen/miniconda3/envs/swinseg/lib/python3.7/site-packages/torch/distributed/elastic/utils/store.py:71: FutureWarning: This is an experimental API and will be changed in future.
  "This is an experimental API and will be changed in future.", FutureWarning
INFO:torch.distributed.elastic.agent.server.api:Done waiting for other agents. Elapsed: 0.0008733272552490234 seconds
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "WORKER", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": 0, "group_rank": 0, "worker_id": "1694342", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 1120, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\", \"local_rank\": [0], \"role_rank\": [0], \"role_world_size\": [2]}", "agent_restarts": 0}}
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "WORKER", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": 1, "group_rank": 0, "worker_id": "1694343", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 1120, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\", \"local_rank\": [1], \"role_rank\": [1], \"role_world_size\": [2]}", "agent_restarts": 0}}
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "AGENT", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": null, "group_rank": 0, "worker_id": null, "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 1120, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\"}", "agent_restarts": 0}}


$ tools/dist_test.sh configs/swin/upernet_swin_small_patch4_window7_512x512_160k_cityscapes.py ./work_dirs/upernet_swin_small_patch4_window7_512x512_160k_cityscapes/latest.pth 2 --eval mIoU
/home/shaosen/miniconda3/envs/swinseg/lib/python3.7/site-packages/torch/distributed/launch.py:164: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  "The module torch.distributed.launch is deprecated "
The module torch.distributed.launch is deprecated and going to be removed in future.Migrate to torch.distributed.run
*****************************************
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. 
*****************************************
WARNING:torch.distributed.run:--use_env is deprecated and will be removed in future releases.
 Please read local_rank from `os.environ('LOCAL_RANK')` instead.
INFO:torch.distributed.launcher.api:Starting elastic_operator with launch configs:
  entrypoint       : tools/test.py
  min_nodes        : 1
  max_nodes        : 1
  nproc_per_node   : 2
  run_id           : none
  rdzv_backend     : static
  rdzv_endpoint    : 127.0.0.1:29500
  rdzv_configs     : {'rank': 0, 'timeout': 900}
  max_restarts     : 3
  monitor_interval : 5
  log_dir          : None
  metrics_cfg      : {}

INFO:torch.distributed.elastic.agent.server.local_elastic_agent:log directory set to: /tmp/torchelastic_6vtwkhxv/none_jab04ns0
INFO:torch.distributed.elastic.agent.server.api:[default] starting workers for entrypoint: python
INFO:torch.distributed.elastic.agent.server.api:[default] Rendezvous'ing worker group
/home/shaosen/miniconda3/envs/swinseg/lib/python3.7/site-packages/torch/distributed/elastic/utils/store.py:53: FutureWarning: This is an experimental API and will be changed in future.
  "This is an experimental API and will be changed in future.", FutureWarning
INFO:torch.distributed.elastic.agent.server.api:[default] Rendezvous complete for workers. Result:
  restart_count=0
  master_addr=127.0.0.1
  master_port=29500
  group_rank=0
  group_world_size=1
  local_ranks=[0, 1]
  role_ranks=[0, 1]
  global_ranks=[0, 1]
  role_world_sizes=[2, 2]
  global_world_sizes=[2, 2]

INFO:torch.distributed.elastic.agent.server.api:[default] Starting worker group
INFO:torch.distributed.elastic.multiprocessing:Setting worker0 reply file to: /tmp/torchelastic_6vtwkhxv/none_jab04ns0/attempt_0/0/error.json
INFO:torch.distributed.elastic.multiprocessing:Setting worker1 reply file to: /tmp/torchelastic_6vtwkhxv/none_jab04ns0/attempt_0/1/error.json
2024-05-12 13:40:55,627 - mmseg - INFO - Loaded 500 images
Use load_from_local loader
Use load_from_local loader
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 500/500, 8.3 task/s, elapsed: 60s, ETA:     0sper class results:

+---------------+-------+-------+
| Class         | IoU   | Acc   |
+---------------+-------+-------+
| road          | 98.57 | 99.27 |
| sidewalk      | 87.97 | 93.9  |
| building      | 93.36 | 97.2  |
| wall          | 55.09 | 61.47 |
| fence         | 65.74 | 74.05 |
| pole          | 69.44 | 79.6  |
| traffic light | 73.97 | 84.49 |
| traffic sign  | 82.81 | 88.92 |
| vegetation    | 93.36 | 96.97 |
| terrain       | 67.33 | 74.32 |
| sky           | 95.71 | 98.59 |
| person        | 84.36 | 92.76 |
| rider         | 65.65 | 77.18 |
| car           | 95.93 | 98.16 |
| truck         | 83.5  | 88.65 |
| bus           | 92.33 | 95.42 |
| train         | 84.05 | 87.36 |
| motorcycle    | 73.7  | 83.99 |
| bicycle       | 80.39 | 89.82 |
+---------------+-------+-------+
Summary:

+--------+-------+-------+-------+
| Scope  | mIoU  | mAcc  | aAcc  |
+--------+-------+-------+-------+
| global | 81.22 | 87.48 | 96.68 |
+--------+-------+-------+-------+
INFO:torch.distributed.elastic.agent.server.api:[default] worker group successfully finished. Waiting 300 seconds for other agents to finish.
INFO:torch.distributed.elastic.agent.server.api:Local worker group finished (SUCCEEDED). Waiting 300 seconds for other agents to finish
/home/shaosen/miniconda3/envs/swinseg/lib/python3.7/site-packages/torch/distributed/elastic/utils/store.py:71: FutureWarning: This is an experimental API and will be changed in future.
  "This is an experimental API and will be changed in future.", FutureWarning
INFO:torch.distributed.elastic.agent.server.api:Done waiting for other agents. Elapsed: 0.0006685256958007812 seconds
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "WORKER", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": 0, "group_rank": 0, "worker_id": "1726592", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 95, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\", \"local_rank\": [0], \"role_rank\": [0], \"role_world_size\": [2]}", "agent_restarts": 0}}
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "WORKER", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": 1, "group_rank": 0, "worker_id": "1726593", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 95, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\", \"local_rank\": [1], \"role_rank\": [1], \"role_world_size\": [2]}", "agent_restarts": 0}}
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "AGENT", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": null, "group_rank": 0, "worker_id": null, "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 95, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\"}", "agent_restarts": 0}}