docstr: Display wandb resources in jupyter.  This can be used as cell or line magic.
  
  %wandb USERNAME/PROJECT/runs/RUN_ID
  ---
  %%wandb -h 1024
  with wandb.init() as run:
      run.log({"loss": 1})
docstr_tok: ["Display","wandb","resources","in","jupyter",".","This","can","be","used","as","cell","or","line","magic",".","%","wandb","USERNAME\/PROJECT\/runs\/RUN_ID","--","-","%","%","wandb","-h","1024","with","wandb.init","(",")","as","run",":","run.log","(","{","``","loss","''",":","1","}",")"]
code: def wandb(self, line, cell=None):
      """Display wandb resources in jupyter.  This can be used as cell or line magic.
  
      %wandb USERNAME/PROJECT/runs/RUN_ID
      ---
      %%wandb -h 1024
      with wandb.init() as run:
          run.log({"loss": 1})
      """
      # Record options
      args = parse_argstring(self.wandb, line)
      self.options["height"] = args.height
      self.options["workspace"] = args.workspace
      self.options["quiet"] = args.quiet
      iframe = IFrame(args.path, opts=self.options)
      displayed = iframe.maybe_display()
      if cell is not None:
          if not displayed:
              # Store the IFrame globally and attempt to display if we have a run
              cell = (
                  f"wandb.jupyter.__IFrame = wandb.jupyter.IFrame(opts={self.options})\n"
                  + cell
                  + "\nwandb.jupyter.__IFrame = None"
              )
          get_ipython().run_cell(cell)
  
imports: import json
  import logging
  import os
  import re
  import shutil
  import sys
  from base64 import b64encode
  from typing import Dict
  import requests
  from requests.compat import urljoin
  import wandb
  import wandb.util
  from wandb.sdk.lib import filesystem
label_desc: Use image node_id 2 for calling the WandBMagics obj's underlying member method code with example usage: obj.wandb(line, cell) without return types