$ tools/dist_test.sh configs/swin/upernet_oc_swin_base_patch4_window7_512x512_160k_cityscapes.py ./work_dirs/upernet_oc_swin_base_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_3extxe15/none_vb391a41
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_3extxe15/none_vb391a41/attempt_0/0/error.json
INFO:torch.distributed.elastic.multiprocessing:Setting worker1 reply file to: /tmp/torchelastic_3extxe15/none_vb391a41/attempt_0/1/error.json
2024-05-13 20:02:56,638 - mmseg - INFO - Loaded 500 images
Use load_from_local loader
Use load_from_local loader
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 500/500, 7.3 task/s, elapsed: 68s, ETA:     0sper class results:

+---------------+-------+-------+
| Class         | IoU   | Acc   |
+---------------+-------+-------+
| road          | 98.57 | 99.31 |
| sidewalk      | 87.94 | 93.63 |
| building      | 93.63 | 97.26 |
| wall          | 58.22 | 64.47 |
| fence         | 68.38 | 75.44 |
| pole          | 70.15 | 80.45 |
| traffic light | 74.36 | 84.13 |
| traffic sign  | 83.32 | 89.73 |
| vegetation    | 93.35 | 96.99 |
| terrain       | 67.06 | 74.69 |
| sky           | 95.73 | 98.63 |
| person        | 84.91 | 93.22 |
| rider         | 66.56 | 76.34 |
| car           | 96.14 | 98.17 |
| truck         | 86.89 | 90.92 |
| bus           | 92.97 | 95.6  |
| train         | 87.05 | 89.12 |
| motorcycle    | 73.5  | 83.86 |
| bicycle       | 81.0  | 90.39 |
+---------------+-------+-------+
Summary:

+--------+-------+-------+-------+
| Scope  | mIoU  | mAcc  | aAcc  |
+--------+-------+-------+-------+
| global | 82.09 | 88.02 | 96.77 |
+--------+-------+-------+-------+
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.000690460205078125 seconds
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "WORKER", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": 0, "group_rank": 0, "worker_id": "3585267", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 105, "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": "3585271", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 105, "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": 105, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\"}", "agent_restarts": 0}}



$ tools/dist_test.sh configs/swin/upernet_oc_swin_base_patch4_window7_512x512_160k_cityscapes.py ./work_dirs/upernet_oc_swin_base_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_opru3kfw/none_5m3g44x9
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_opru3kfw/none_5m3g44x9/attempt_0/0/error.json
INFO:torch.distributed.elastic.multiprocessing:Setting worker1 reply file to: /tmp/torchelastic_opru3kfw/none_5m3g44x9/attempt_0/1/error.json
2024-05-13 20:06:52,797 - mmseg - INFO - Loaded 500 images
Use load_from_local loader
Use load_from_local loader
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 500/500, 0.4 task/s, elapsed: 1251s, ETA:     0sper class results:

+---------------+-------+-------+
| Class         | IoU   | Acc   |
+---------------+-------+-------+
| road          | 98.7  | 99.35 |
| sidewalk      | 88.89 | 94.0  |
| building      | 94.02 | 97.39 |
| wall          | 61.4  | 67.48 |
| fence         | 70.21 | 76.76 |
| pole          | 72.23 | 81.52 |
| traffic light | 76.28 | 84.91 |
| traffic sign  | 84.83 | 90.52 |
| vegetation    | 93.63 | 97.25 |
| terrain       | 68.77 | 75.76 |
| sky           | 95.81 | 98.69 |
| person        | 86.23 | 94.24 |
| rider         | 69.04 | 78.49 |
| car           | 96.36 | 98.44 |
| truck         | 86.68 | 90.17 |
| bus           | 94.1  | 96.15 |
| train         | 87.66 | 89.27 |
| motorcycle    | 75.5  | 85.04 |
| bicycle       | 82.46 | 91.68 |
+---------------+-------+-------+
Summary:

+--------+-------+------+-------+
| Scope  | mIoU  | mAcc | aAcc  |
+--------+-------+------+-------+
| global | 83.31 | 88.8 | 96.99 |
+--------+-------+------+-------+
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.0006012916564941406 seconds
{"name": "torchelastic.worker.status.SUCCEEDED", "source": "WORKER", "timestamp": 0, "metadata": {"run_id": "none", "global_rank": 0, "group_rank": 0, "worker_id": "3609491", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 1291, "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": "3609495", "role": "default", "hostname": "shaosen", "state": "SUCCEEDED", "total_run_time": 1291, "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": 1291, "rdzv_backend": "static", "raw_error": null, "metadata": "{\"group_world_size\": 1, \"entry_point\": \"python\"}", "agent_restarts": 0}}

