def launch_tensorboard_in_background(log_dir):
import subprocess<EOL>subprocess.Popen(['<STR_LIT>', '<STR_LIT>', log_dir])<EOL>
To log the Tensorflow graph when using rl-algs
algorithms, you can run the following code
in your main script:
    import threading, time
    def start_tensorboard(session):
        time.sleep(10) # Wait until graph is setup
        tb_path = osp.join(logger.get_dir(), 'tb')
        summary_writer = tf.summary.FileWriter(tb_path, graph=session.graph)
        summary_op = tf.summary.merge_all()
        launch_tensorboard_in_background(tb_path)
    session = tf.get_default_session()
    t = threading.Thread(target=start_tensorboard, args=([session]))
    t.start()