def __init__(self, options={}): if os.getenv("WANDB_JUPYTER"): display(jupyter.Run()) else: self.rm = False termerror( "wandb.monitor is only functional in Jupyter notebooks")
def __init__(self, options={}): # So much for our constant... global START_TIME START_TIME = time.time() self.api = http_api # TODO: there's an edge case where shutdown isn't called self.api._file_stream_api = None self.api.set_current_run_id(run.id) self.options = options if os.getenv("WANDB_JUPYTER"): self.rm = RunManager(self.api, run, output=False) self.rm.mirror_stdout_stderr() self.rm.init_run(dict(os.environ)) if display: display(jupyter.Run()) else: self.rm = False termerror( "wandb.monitor is only functional in Jupyter notebooks")