hitachi-speech / EEND

End-to-End Neural Diarization
MIT License
368 stars 57 forks source link

about the "get_free_gpus()" function #35

Open Wang-Zeyu opened 2 years ago

Wang-Zeyu commented 2 years ago

https://github.com/hitachi-speech/EEND/blob/b851eecd8d7a966487ed3e4ff934a1581a73cc9e/eend/chainer_backend/utils.py#L40

when there are 2 process running on the same GPU IDs,the "del gpus[busid]" will raise key error.

DiLiangWU commented 2 years ago

If there are 2 process running on the same GPU IDs, You should change the code here. First determine whether the key exists in gpus now. If exist, then delete,otherwise do nothing. This way, the second attempt to delete won't raise key error.