Commit 638533e0 authored by Ilya Ovodov's avatar Ilya Ovodov

TensorBoardLogger cmd line fixes: abspath and port position

parent 7b2c99c7
......@@ -176,8 +176,8 @@ class TensorBoardLogger:
#cmd = r"tensorboard --host 127.0.0.1 --port {port} --logdir {dir}".format(port=port, dir=self.log_dir)
#print(cmd)
#os.popen(cmd)
cmd = r'tensorboard --host 127.0.0.1 --port {port} --logdir ""'.format(port=port).split(' ')
cmd[-1] = self.log_dir # can contain spaces
cmd = r'tensorboard --host 127.0.0.1 --logdir "" --port {port}'.format(port=port).split(' ')
cmd[-3] = os.path.abspath(self.log_dir) # log_dir can contain spaces, so need to be set after split
print(' '.join(cmd))
if start_it:
subprocess.Popen(cmd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment