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.
1 parent 97bdbf4 commit 1b452eeCopy full SHA for 1b452ee
gpus.go
@@ -51,9 +51,11 @@ func ParseTotalGPUs() float64 {
51
output := string(Execute("sinfo", args))
52
if len(output) > 0 {
53
for _, line := range strings.Split(output, "\n") {
54
- log.Infof("Line %s: ", line)
55
- descriptor := strings.Split(line, " ")[0]
56
- log.Infof("Descriptor %s: ", descriptor)
+ if len(line) > 0 {
+ log.Infof("Line %s: ", line)
+ descriptor := strings.Split(line, " ")[0]
57
+ log.Infof("Descriptor %s: ", descriptor)
58
+ }
59
}
60
61
0 commit comments