报错:torchrun --nprocpernode=2 tracking/train.py --script ceutrack --config ceutrackcoesot…
- User
报错:torchrun --nproc_per_node=2 tracking/train.py --script ceutrack --config ceutrack_coesot --save_dir ./output --use_wandb 0 [2024-06-20 15:25:56,345] torch.distributed.run: [WARNING] [2024-06-20 15:25:56,345] torch.distributed.run: [WARNING] ***************************************** [2024-06-20 15:25:56,345] torch.distributed.run: [WARNING] 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. [2024-06-20 15:25:56,345] torch.distributed.run: [WARNING] ***************************************** 2024-06-20 15:25:59.390439: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-06-20 15:25:59.390438: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-06-20 15:26:00.129371: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 2024-06-20 15:26:00.129370: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT script_name: ceutrack.py config_name: ceutrack_coesot.yaml script_name: ceutrack.py config_name: ceutrack_coesot.yaml New configuration is shown below. New configuration is shown below.MODEL configuration: MODEL configuration: {'PRETRAIN_FILE': 'mae_pretrain_vit_base.pth', 'EXTRA_MERGER': False, 'RETURN_INTER': False, 'RETURN_STAGES': [], 'BACKBONE': {'TYPE': 'vit_base_patch16_224_ce', 'STRIDE': 16, 'MID_PE': False, 'SEP_SEG': False, 'CAT_MODE': 'direct', 'MERGE_LAYER': 0, 'ADD_CLS_TOKEN': False, 'CLS_TOKEN_USE_MODE': 'ignore', 'CE_LOC': [3, 6, 9], 'CE_KEEP_RATIO': [1, 1, 1], 'CE_TEMPLATE_RANGE': 'CTR_POINT'}, 'HEAD': {'TYPE': 'CENTER', 'NUM_CHANNELS': 256}}{'PRETRAIN_FILE': 'mae_pretrain_vit_base.pth', 'EXTRA_MERGER': False, 'RETURN_INTER': False, 'RETURN_STAGES': [], 'BACKBONE': {'TYPE': 'vit_base_patch16_224_ce', 'STRIDE': 16, 'MID_PE': False, 'SEP_SEG': False, 'CAT_MODE': 'direct', 'MERGE_LAYER': 0, 'ADD_CLS_TOKEN': False, 'CLS_TOKEN_USE_MODE': 'ignore', 'CE_LOC': [3, 6, 9], 'CE_KEEP_RATIO': [1, 1, 1], 'CE_TEMPLATE_RANGE': 'CTR_POINT'}, 'HEAD': {'TYPE': 'CENTER', 'NUM_CHANNELS': 256}}
TRAIN configuration:TRAIN configuration: {'LR': 0.0001, 'WEIGHT_DECAY': 0.0001, 'EPOCH': 50, 'LR_DROP_EPOCH': 40, 'BATCH_SIZE': 16, 'NUM_WORKER': 4, 'OPTIMIZER': 'ADAMW', 'BACKBONE_MULTIPLIER': 0.1, 'GIOU_WEIGHT': 1, 'L1_WEIGHT': 14, 'FOCAL_WEIGHT': 1.0, 'FREEZE_LAYERS': [0], 'PRINT_INTERVAL': 50, 'VAL_EPOCH_INTERVAL': 1, 'GRAD_CLIP_NORM': 0.1, 'AMP': False, 'CE_START_EPOCH': 0, 'CE_WARM_EPOCH': 0, 'DROP_PATH_RATE': 0.1, 'SCHEDULER': {'TYPE': 'step', 'T_MAX': 10, 'ETA_MIN': 5e-06, 'DECAY_RATE': 0.1, 'MILESTONES': [50, 80], 'GAMMA': 0.1}}{'LR': 0.0001, 'WEIGHT_DECAY': 0.0001, 'EPOCH': 50, 'LR_DROP_EPOCH': 40, 'BATCH_SIZE': 16, 'NUM_WORKER': 4, 'OPTIMIZER': 'ADAMW', 'BACKBONE_MULTIPLIER': 0.1, 'GIOU_WEIGHT': 1, 'L1_WEIGHT': 14, 'FOCAL_WEIGHT': 1.0, 'FREEZE_LAYERS': [0], 'PRINT_INTERVAL': 50, 'VAL_EPOCH_INTERVAL': 1, 'GRAD_CLIP_NORM': 0.1, 'AMP': False, 'CE_START_EPOCH': 0, 'CE_WARM_EPOCH': 0, 'DROP_PATH_RATE': 0.1, 'SCHEDULER': {'TYPE': 'step', 'T_MAX': 10, 'ETA_MIN': 5e-06, 'DECAY_RATE': 0.1, 'MILESTONES': [50, 80], 'GAMMA': 0.1}}
- Assistant
从你的错误日志来看,问题主要出在以下几点:
-
关于OMP_NUM_THREADS的警告: 这是一个警告信息,表明默认情况下已经为每个进程设置了
OMP_NUM_THREADS环境变量为1,以避免系统被过度加载。这只是一个性能建议,不是错误。 -
TensorFlow相关的日志信息: 出现了一些关于TensorFlow无法找到某些指令集如AVX2、AVX512F和FMA的提示,以及无法找到TensorRT的警告。这些信息可能对你的训练过程没有致命影响,如无特殊需求可以暂时忽略。
-
真正的错误:
FileExistsError: [Errno 17] File exists: '/data2/local_userdata/heyuting/new_VOT/COESOT-main/CEUTrack/output/logs'此错误表明在创建目录时,目标目录"/data2/local_userdata/heyuting/new_VOT/COESOT-main/CEUTrack/output/logs"已经存在。默认情况下,
os.makedirs会在试图创建已经存在的目录时抛出此错误。
解决方案
-
: 你可以在创建日志目录之前,添加条件检查,确保只有在目录不存在时才创建它。例如:
-
- User
现在进行多卡训练有问题,仅使用了一张显卡,0号。
- Assistant
在进行多卡训练时,如果仅使用了一张显卡,可能是由于多种原因导致的。下面是一些常见的原因和相应的解决办法:
1. 确认环境配置
确保你的环境正确配置支持多卡训练。你可以运行以下命令来检查你的系统识别到的所有GPU: