Open yegortokmakov opened 4 years ago
but exposing dynamic ports publicly is not allowed by SageMaker
So, is there a static ports available publicly? Is there a documentation that we can refer to?
I think you can achieve what you want by using combination of port
and path_prefix
without introducing new flags.
From tensorboard --help
--port PORT Port to serve TensorBoard on. Pass 0 to request an
unused port selected by the operating system, or pass
"default" to try to bind to the default port (6006)
but search for a nearby free port if the default port
is unavailable. (default: "default").
...
--path_prefix PATH An optional, relative prefix to the path, e.g.
"/path/to/tensorboard". resulting in the new base url
being located at localhost:6006/path/to/tensorboard
under default settings. A leading slash is required
when specifying the path_prefix. A trailing slash is
optional and has no effect. The path_prefix can be
leveraged for path based routing of an ELB when the
website base_url is not available e.g.
"example.site.com/path/to/tensorboard/".
I guess path_prefix is not propagated to _display
and _display_ipython
.
I guess path_prefix is not propagated to
_display
and_display_ipython
.
Correct; we considered doing this and decided that it was simpler to
omit it and just not pass %tensorboard --path_prefix
. See “§” note:
https://github.com/tensorflow/tensorboard/blob/master/docs/design/colab_integration.md#high-level-changes-and-apis.
@stephanwlee yes, it's not propagated and even if it was, I still would need a separate pair of controls: I need tensorboard to still use localhost and port 80, but iframe to point to a different url.
@wchargin I've read the design doc, but seems like solution for SageMaker might be a bit easier. I thought about adding an additional parameter for _display and do const url = new URL("/", propogated_iframe_location or window.location);
and something similar for the port number.
But now that you pointed me to Colab doc, it seems like adding a new context in a similar way to Colab is the easiest option.
any update on this one?
I'm using hosted notebooks on SageMaker and accessing them on
https://xxxxx.notebook.eu-west-1.sagemaker.aws/notebooks/shallowlearning.ipynb
.I'm starting TB in ipython context with these commands:
Generated iframe has url
https://xxxxx.notebook.eu-west-1.sagemaker.aws:6006/
but exposing dynamic ports publicly is not allowed by SageMaker (and I would expect by other hosted notebook providers too). As a workaround SageMaker provides proxy, so TB could be accessed onhttps://xxxxx.notebook.eu-west-1.sagemaker.aws/proxy/6006/
.Would be nice to have possibility to have parameters
display_port
anddisplay_hostname
to override default variables in https://github.com/tensorflow/tensorboard/blob/master/tensorboard/notebook.py#L381Let me know if you would welcome PR for this feature.