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 6ad065f commit 8ab5913Copy full SHA for 8ab5913
ISAT/segment_any/gpu_resource.py
@@ -33,9 +33,12 @@ def __init__(self):
33
34
def run(self):
35
while True:
36
- r = os.popen('{} Used'.format(self.command)).readline()
37
- used = r.split(':')[-1].strip().split(' ')[0]
38
- self.message.emit("cuda: {}/{}MiB".format(used, self.total))
+ try:
+ r = os.popen('{} Used'.format(self.command)).readline()
+ used = r.split(':')[-1].strip().split(' ')[0]
39
+ self.message.emit("cuda: {}/{}MiB".format(used, self.total))
40
+ except:
41
+ self.message.emit("cuda: {}/{}MiB".format('-', '-'))
42
43
def __del__(self):
44
self.message.emit("Ground filter thread | Wait for thread to exit.")
0 commit comments