googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
975 stars 249 forks source link

Running tensorflow with --debugger_port #2089

Closed OrielResearchCure closed 5 years ago

OrielResearchCure commented 5 years ago

Hello,

I am trying to run tensorboard from datalab with the --debugger_port option. I used the code in the github and added the debugger_port

logdir = '/content/datalab/notebooks/logs/41'
port = 6006
debuggerPort = 6064
args = ['tensorboard', '--logdir=' + logdir, '--debugger_port' + str(debuggerPort) ,'--port=' + str(port)]

retry = 2
while (retry > 0):
  if datalab.utils.is_http_running_on(port):
    basepath = os.environ.get('DATALAB_ENDPOINT_URL', '')
    print(basepath)
    url = '%s/_proxy/%d/' % (basepath.rstrip('/'), port)
    print(url)
    html = '<p>TensorBoard was started successfully with pid %d. ' % p.pid
    html += 'Click <a href="%s" target="_blank">here</a> to access it.</p>' % url
    print('html ',html)
    IPython.display.display_html(html, raw=True)
    print p.pid
  time.sleep(1)
  retry -= 1

when I switch to debugger mode, I am getting a request to use the --debugger_port switch.

Please advice how I can make it work.

Many thanks, eilalan

yebrahim commented 5 years ago

Looks like you're missing an equals sign in the arguments: '--debugger_port=' + str(debuggerPort)

OrielResearchCure commented 5 years ago

thank you :-)