Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 510 forks source link

YOLO-NAS Training Halted with 'Killed' Error Message #1214

Closed khokao closed 1 year ago

khokao commented 1 year ago

💡 Your Question

Hello, thanks for this useful repository !

I've been trying to train YOLO-NAS on the COCO dataset, but the training process stops after running just a few epochs, with the Killed message appearing in the standard output.

According to the log file, the GPU memory usage seems to fluctuate significantly. Could there possibly be a memory leak causing this issue?

For reference, I've been using the following command to train the model:

python src/super_gradients/train_from_recipe.py --config-name=coco2017_yolo_nas_s.yaml

Versions

Collecting environment information...
PyTorch version: 1.10.2+cu111
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2
Libc version: glibc-2.26

Python version: 3.7.3 (default, Nov 15 2022, 01:26:35)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.15.0-73-generic-x86_64-with-debian-buster-sid
Is CUDA available: True
CUDA runtime version: 11.1.105
CUDA_MODULE_LOADING set to: 
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090
Nvidia driver version: 525.116.04
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              20
On-line CPU(s) list: 0-19
Thread(s) per core:  1
Core(s) per socket:  12
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               151
Model name:          12th Gen Intel(R) Core(TM) i7-12700K
Stepping:            2
CPU MHz:             3600.000
CPU max MHz:         5000.0000
CPU min MHz:         800.0000
BogoMIPS:            7219.20
Virtualization:      VT-x
L1d cache:           48K
L1i cache:           32K
L2 cache:            1280K
L3 cache:            25600K
NUMA node0 CPU(s):   0-19
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] flake8==5.0.4
[pip3] flake8-commas==2.1.0
[pip3] flake8-isort==6.0.0
[pip3] flake8-polyfill==1.0.2
[pip3] flake8-quotes==3.3.2
[pip3] numpy==1.21.6
[pip3] pyproject-flake8==5.0.4.post1
[pip3] torch==1.10.2+cu111
[pip3] torchmetrics==0.8.0
[pip3] torchvision==0.11.3+cu111
[conda] Could not collect
BloodAxe commented 1 year ago

It looks you are using quite old torch build with old CUDA. This may not be the root cause of the problem, but anyway I suggest you trying the recent torch versions. We were able to train yolo nas in different hardware & OS and didn't notice such issues.

Try looking at the dmesg output - maybe you will find additional details why the process was Killed.

Suggestions: