TommyZihao/MMGeneration_Tutorials

在训练cycle GAN时报错

Opened this issue · 0 comments

在运行下下代码时:
屏幕截图 2023-12-24 171443
出现错误:
/environment/miniconda3/lib/python3.10/site-packages/torch/distributed/launch.py:178: 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(
/environment/miniconda3/lib/python3.10/site-packages/mmcv/init.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
/home/featurize/styletransfer/mmgeneration/tools/train.py:97: UserWarning: 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.
warnings.warn(
/home/featurize/styletransfer/mmgeneration/tools/train.py:107: UserWarning: Setting MKL_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.
warnings.warn(
Traceback (most recent call last):
File "/home/featurize/styletransfer/mmgeneration/tools/train.py", line 228, in
main()
File "/home/featurize/styletransfer/mmgeneration/tools/train.py", line 169, in main
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
File "/environment/miniconda3/lib/python3.10/site-packages/mmcv/utils/config.py", line 596, in dump
f.write(self.pretty_text)
File "/environment/miniconda3/lib/python3.10/site-packages/mmcv/utils/config.py", line 508, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 19076) of binary: /environment/miniconda3/bin/python
tools/dist_train.sh: line 20: 19069 Segmentation fault (core dumped) PYTHONPATH="$(dirname $0)/..":$PYTHONPATH python -m torch.distributed.launch --nnodes=$NNODES --node_rank=$NODE_RANK --master_addr=$MASTER_ADDR --nproc_per_node=$GPUS --master_port=$PORT $(dirname "$0")/train.py $CONFIG --seed 0 --launcher pytorch ${@:3}