fastgpu
fastgpu copied to clipboard
sleep not defined
I'm having an issue running fastgpu I get the following error
Traceback (most recent call last):
File "/home/cody/miniconda3/envs/IK/bin/fastgpu_poll", line 10, in <module>
sys.exit(fastgpu_poll())
File "/home/cody/miniconda3/envs/IK/lib/python3.8/site-packages/fastscript/core.py", line 76, in _f
func(**args.__dict__)
File "/home/cody/miniconda3/envs/IK/lib/python3.8/site-packages/fastgpu/cli.py", line 12, in fastgpu_poll
rp.poll_scripts(exit_when_empty=exit)
File "/home/cody/miniconda3/envs/IK/lib/python3.8/site-packages/fastgpu/core.py", line 79, in poll_scripts
sleep(poll_interval)
NameError: name 'sleep' is not defined
I installed fastcore, fastgpu, and fastscript via conda-forge
fastcore 1.1.0 py_0 fastai
fastgpu 1.0.1 pyh39e3cac_0 fastai
fastscript 1.0.0 0 fastai
I inspected the source code from core.py and sure enough no import or call to sleep
def poll_scripts(self, poll_interval=0.1, exit_when_empty=True):
while True:
sleep(poll_interval)
script = find_next_script(self.path/'to_run')
if script is None:
if exit_when_empty: break
else: continue
ident = self.lock_next()
if ident is None: continue
run_name = safe_rename(script, self.path/'running')
self.run(run_name, ident)
I assume this was supposed to be implmented in fastcore.all or pynvml ....
I have the same issue. sleep is imported from time in fastcore.nb_imports, but that never makes it into fastgpu's imports.