We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d650052 + 990ce1b commit 4faa584Copy full SHA for 4faa584
source/train/Local.py
@@ -5,6 +5,9 @@ def get_resource ():
5
nodelist = [nodename]
6
gpus = os.getenv('CUDA_VISIBLE_DEVICES')
7
if gpus is not None :
8
- gpus = gpus.split(",")
9
- gpus = [int(ii) for ii in gpus]
+ if gpus != "" :
+ gpus = gpus.split(",")
10
+ gpus = [int(ii) for ii in gpus]
11
+ else :
12
+ gpus = []
13
return nodename, nodelist, gpus
0 commit comments