Closed ckhuang0614 closed 2 years ago
It would be fine when use PyTorch (1.8.2+cu111).
python3 ./train_net.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml --num-gpus 1 SOLVER.IMS_PER_BATCH 2 SOLVER.BASE_LR 0.0025
sys.platform linux
Python 3.6.9 (default, Dec 8 2021, 21:08:43) [GCC 8.4.0]
numpy 1.19.5
detectron2 0.6 @/home/nvidia/detectron2/detectron2
Compiler GCC 7.5
CUDA compiler CUDA 11.4
detectron2 arch flags 8.6
DETECTRON2_ENV_MODULE
PyTorch built with:
Hi, I tried to downgrade the setuptools and then it works.
conda install setuptools=58.2.0
Duplicate of https://github.com/pytorch/pytorch/issues/69894
Instructions To Reproduce the š Bug:
no changes detected!
python3 ./train_net.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml --num-gpus 1 SOLVER.IMS_PER_BATCH 2 SOLVER.BASE_LR 0.0025 Command Line Args: Namespace(config_file='../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml', dist_url='tcp://127.0.0.1:50152', eval_only=False, machine_rank=0, num_gpus=1, num_machines=1, opts=['SOLVER.IMS_PER_BATCH', '2', 'SOLVER.BASE_LR', '0.0025'], resume=False) [12/22 09:59:45 detectron2]: Rank of current process: 0. World size: 1 [12/22 09:59:46 detectron2]: Environment info:
sys.platform linux Python 3.6.9 (default, Dec 8 2021, 21:08:43) [GCC 8.4.0] numpy 1.19.5 detectron2 0.6 @/home/nvidia/detectron2/detectron2 Compiler GCC 7.5 CUDA compiler CUDA 11.4 detectron2 arch flags 8.6 DETECTRON2_ENV_MODULE
PyTorch 1.10.1+cu113 @/home/nvidia/.local/lib/python3.6/site-packages/torch
PyTorch debug build False
GPU available Yes
GPU 0 NVIDIA GeForce RTX 3070 (arch=8.6)
Driver version 510.06
CUDA_HOME /usr/local/cuda
Pillow 8.4.0
torchvision 0.11.2+cu113 @/home/nvidia/.local/lib/python3.6/site-packages/torchvision
torchvision arch flags 3.5, 5.0, 6.0, 7.0, 7.5, 8.0, 8.6
fvcore 0.1.5.post20211023
iopath 0.1.9
cv2 4.5.4
PyTorch built with:
[12/22 09:59:46 detectron2]: Command line arguments: Namespace(config_file='../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml', dist_url='tcp://127.0.0.1:50152', eval_only=False, machine_rank=0, num_gpus=1, num_machines=1, opts=['SOLVER.IMS_PER_BATCH', '2', 'SOLVER.BASE_LR', '0.0025'], resume=False) [12/22 09:59:46 detectron2]: Contents of args.config_file=../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml: BASE: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50
[12/22 09:59:46 detectron2]: Running with full config: CUDNN_BENCHMARK: false DATALOADER: ASPECT_RATIO_GROUPING: true FILTER_EMPTY_ANNOTATIONS: true NUM_WORKERS: 4 REPEAT_THRESHOLD: 0.0 SAMPLER_TRAIN: TrainingSampler DATASETS: PRECOMPUTED_PROPOSAL_TOPK_TEST: 1000 PRECOMPUTED_PROPOSAL_TOPK_TRAIN: 2000 PROPOSAL_FILES_TEST: [] PROPOSAL_FILES_TRAIN: [] TEST:
[12/22 09:59:46 detectron2]: Full config saved to ./output/config.yaml [12/22 09:59:46 d2.utils.env]: Using a generated random seed 46408955
[12/22 09:59:50 d2.data.dataset_mapper]: [DatasetMapper] Augmentations used in training: [ResizeShortestEdge(short_edge_length=(640, 672, 704, 736, 768, 800), max_size=1333, sample_style='choice'), RandomFlip()] [12/22 09:59:50 d2.data.build]: Using training sampler TrainingSampler [12/22 09:59:50 d2.data.common]: Serializing 98 elements to byte tensors and concatenating them all ... [12/22 09:59:50 d2.data.common]: Serialized dataset takes 0.46 MiB Traceback (most recent call last): File "./train_net.py", line 169, in
args=(args,),
File "/home/nvidia/detectron2/detectron2/engine/launch.py", line 82, in launch
main_func(*args)
File "./train_net.py", line 151, in main
trainer = Trainer(cfg)
File "/home/nvidia/detectron2/detectron2/engine/defaults.py", line 396, in init
self.register_hooks(self.build_hooks())
File "/home/nvidia/detectron2/detectron2/engine/defaults.py", line 463, in build_hooks
ret.append(hooks.PeriodicWriter(self.build_writers(), period=20))
File "/home/nvidia/detectron2/detectron2/engine/defaults.py", line 475, in build_writers
return default_writers(self.cfg.OUTPUT_DIR, self.max_iter)
File "/home/nvidia/detectron2/detectron2/engine/defaults.py", line 248, in default_writers
TensorboardXWriter(output_dir),
File "/home/nvidia/detectron2/detectron2/utils/events.py", line 145, in init
from torch.utils.tensorboard import SummaryWriter
File "/home/nvidia/.local/lib/python3.6/site-packages/torch/utils/tensorboard/init.py", line 4, in
LooseVersion = distutils.version.LooseVersion
AttributeError: module 'distutils' has no attribute 'version'
wget -nc -q https://github.com/facebookresearch/detectron2/raw/main/detectron2/utils/collect_env.py && python collect_env.py