PaddlePaddle/PaddleSeg

AttributeError: 'Config' object has no attribute 'check_sync_info'

pvinhd opened this issue · 1 comments

问题确认 Search before asking

Bug描述 Describe the Bug

I train my Customized Dataset on Google Colab and I get this error. :<
!python /content/PaddleSeg/train.py --config /content/gdrive/MyDrive/config.yml --do_eval --use_vdl --save_interval 100 --save_dir output

2024-03-29 07:52:13 [INFO]
------------Environment Information-------------
platform: Linux-6.1.58+-x86_64-with-glibc2.35
Python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Paddle compiled with cuda: True
NVCC: Build cuda_12.2.r12.2/compiler.33191640_0
cudnn: 8.9
GPUs used: 1
CUDA_VISIBLE_DEVICES: None
GPU: ['GPU 0: Tesla T4']
GCC: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
PaddleSeg: 2.9.0
PaddlePaddle: 2.6.1
OpenCV: 4.5.5

2024-03-29 07:52:13 [WARNING] Add the num_classes in train_dataset and val_dataset config to model config. We suggest you manually set num_classes in model config.
Traceback (most recent call last):
File "/content/PaddleSeg/train.py", line 262, in
main(args)
File "/content/PaddleSeg/train.py", line 196, in main
cfg.check_sync_info()
AttributeError: 'Config' object has no attribute 'check_sync_info'

My config.yml
`batch_size: 8
iters: 15000

train_dataset:
type: Dataset
dataset_root: /content/dataset
train_path: /content/dataset/train.txt
num_classes: 5
transforms:
- type: ResizeStepScaling
min_scale_factor: 0.125
max_scale_factor: 1.5
scale_step_size: 0.125
- type: RandomPaddingCrop
crop_size: [1024, 512]
- type: RandomHorizontalFlip
- type: RandomDistort
brightness_range: 0.5
contrast_range: 0.5
saturation_range: 0.5
- type: Normalize
mode: train

val_dataset:
type: Dataset
dataset_root: /content/dataset
val_path: /content/dataset/val.txt
num_classes: 5
transforms:
- type: Normalize
mode: val

optimizer:
type: sgd
momentum: 0.9
weight_decay: 5.0e-4

lr_scheduler:
type: PolynomialDecay
end_lr: 0
power: 0.9
warmup_iters: 50
warmup_start_lr: 1.0e-5
learning_rate: 0.005

loss:
types:
- type: OhemCrossEntropyLoss
min_kept: 130000 # batch_size * 1024 * 512 // 16
- type: OhemCrossEntropyLoss
min_kept: 130000
- type: OhemCrossEntropyLoss
min_kept: 130000
coef: [1, 1, 1]

test_config:
aug_eval: True
scales: 0.5

model:
type: PPLiteSeg
backbone:
type: STDC1
pretrained: https://bj.bcebos.com/paddleseg/dygraph/PP_STDCNet1.tar.gz
arm_out_chs: [32, 64, 128]
seg_head_inter_chs: [32, 64, 64]
`

复现环境 Environment

------------Environment Information-------------
platform: Linux-6.1.58+-x86_64-with-glibc2.35
Python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Paddle compiled with cuda: True
NVCC: Build cuda_12.2.r12.2/compiler.33191640_0
cudnn: 8.9
GPUs used: 1
CUDA_VISIBLE_DEVICES: None
GPU: ['GPU 0: Tesla T4']
GCC: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
PaddleSeg: 2.9.0
PaddlePaddle: 2.6.1
OpenCV: 4.5.5

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!

check_sync_info is no longer used in the main branch, please try to update your code.