Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
Bug description
The execution hangs right after GPU device creation when executed deeplabcut.train_network(path_config_file, shuffle=1, displayiters=1, saveiters=5, maxiters=100). (I intentionally scaled the value down to attempt to have the job start displaying each training iteration).
Expects:
Expecting to see the unhighlighted section , especially the "iteration, loss, lr` displays.

Operating System
Operating System: CentOS Linux 8
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-240.15.1.el8_3.x86_64
Architecture: x86-64
DeepLabCut version
DLC v2.3.4
DeepLabCut mode
single animal
Device type
- CPU: 2 AMD EPYC 7502 32 core (only provisioned 8 cores for the job)
- GPU: Nvidia Tesla T100 (40GB)
- Nvidia Driver Version: 460.32.03
- CUDA Version: 11.2
Steps To Reproduce
- Ensure Nvidia driver and CUDA version are installed and matching the TensorFlow v2.8 requirements
git clone https://github.com/DeepLabCut/DeepLabCut.git, and Conda install using the yaml requirement file.- Ensure that environ var
$LD_LIBRARY_PATHis pointing to all the needed libraries for TF, and$DLClight== True conda activate DEEPLABCUT- Run
python - In
pythonrunimport tensorflow as tfandtf.config.list_physical_devices("GPU")to make sure that TF does find the GPU. exit()and runpythonagain- In 'python
runimport deeplabcut` - In
pythonrunpath_config_file = '/data001/projects/leean9/DeepLabCut/examples/openfield-Pranav-2018-10-30/config.yaml - In
pythonrundeeplabcut.load_demo_data(path_config_file) - In
pythonrundeeplabcut.train_network(path_config_file, shuffle=1, displayiters=1, saveiters=5, maxiters=100)
Relevant log output
(DEEPLABCUT) bash-4.4$ nvidia-smi Thu May 4 15:22:28 2023 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 A100-PCIE-40GB On | 00000000:01:00.0 Off | 0 | | N/A 32C P0 35W / 250W | 0MiB / 40536MiB | 0% Default | | | | Disabled | +-------------------------------+----------------------+----------------------+ | 1 A100-PCIE-40GB On | 00000000:A1:00.0 Off | 0 | | N/A 34C P0 37W / 250W | 0MiB / 40536MiB | 0% Default | | | | Disabled | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+ (DEEPLABCUT) bash-4.4$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Thu_Jan_28_19:32:09_PST_2021 Cuda compilation tools, release 11.2, V11.2.142 Build cuda_11.2.r11.2/compiler.29558016_0
(DEEPLABCUT) bash-4.4$ pip list | grep -E 'nvidia|tensor|deeplab|gcc' deeplabcut 2.3.4 napari-deeplabcut 0.1.2 nvidia-cublas 11.5.1.101 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-nvrtc 11.1.105 nvidia-cuda-runtime 11.3.58 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn 8.2.0.51 nvidia-cudnn-cu12 8.9.0.131 nvidia-tensorrt 7.2.3.4 tensorboard 2.8.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow 2.8.4 tensorflow-estimator 2.8.0 tensorflow-io-gcs-filesystem 0.32.0 tensorpack 0.11 tensorrt 8.6.1 tensorrt-bindings 8.6.1 tensorrt-libs 8.6.1
(DEEPLABCUT) bash-4.4$ gcc --version gcc (GCC) 9.2.1 20191120 (Red Hat 9.2.1-2) Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Anything else?
This is the nvidia-smi output, and as you one can see only about 500-800 MB is being used and 0% utilization.

Thank you for taking the time, I've tried to search through SO and various forums/documentations and had to downgrade the from TF v2.10 to v2.8 due to the GCC requirements (I have GCC v9.2 and TF v2.10 requires GCC v9.3) so to resolve some of the error messages. Perhaps the Conda checks didn't catch it?
**Update 2023-05-04 21:34 UTC - **
Seems like the code output format got messed up, thus here is a screenshot.

Code of Conduct
- I agree to follow this project's Code of Conduct


Activity
DianaY-J commentedon May 11, 2023
Hi,
@LWitter and I met a similar problem this week, and we found it's an issue with the size of input image. Our solution is attached below:
anthonyylee commentedon May 11, 2023
@DianaY-J , thank you for your input!
The result I am experiencing is actually with the demo data that is provided in in the DLC github repo (under
examplesdirectory and specifically theopenfield-Pranav-2018-10-30example). After successfully running this demo on Colab, I was trying to run it on my cluster.Recently, we are suspecting that it might be something on the cluster's end because the Python process on the cluster when we ran
topshows 0.0~0.3% CPU usage (for reference,topfluctuates around the same CPU usage percentage) yet the same Python process is using about 20GB of memory.n-poulsen commentedon May 26, 2023
Hi @aoot, I have seen that issue and the underlying cause was often a problem with permissions where the code is running (e.g., you don't have access to write to the folder where the initial weights are being downloaded). Could you check that you have full read/write rights?
anthonyylee commentedon Jun 14, 2023
I presume so being that I was working out of my home directory which I do have full read/write.
Unless the initial weights are downloaded to somewhere else?
How may I check this?
n-poulsen commentedon Jun 15, 2023
The initial weights are downloaded to your where DeepLabCut is installed (which is, if you use conda/miniconda, in the
miniconda3/envs/YOUR_ENVIRONMENTfolder).You can check the path where the initial weights are in the
dlc-models/.../train/pose_cfg.yamlfile.anthonyylee commentedon Jun 15, 2023
Yeah, I do have both read/write permission into this folder.
Does DLC utilize IPython during runs (even with headless mode)?
jeylau commentedon Jun 19, 2023
Hi @aoot, could it be that your images are pretty large (i.e., w/ sides larger than 1500 pixels)?
anthonyylee commentedon Jun 25, 2023
Doesn't seem like the case because this is the result from running on the demo data provided in the repo.
n-poulsen commentedon Jun 26, 2023
From the TensorFlow compatibility charts, it seems that TF 2.8 is compatible with CUDA 11.2 but cuDNN 8.1. You seem to have cuDNN 8.2 installed (maybe nvidia-cudnn-cu112 is the wrong version as well?).
Maybe downgrading cuDNN is the solution?
anthonyylee commentedon Jun 28, 2023
I'll give it a shot and report back~
n-poulsen commentedon Jul 20, 2023
Closing as stale