TensorBoard can be launched with a --path_prefix=[path] option to set a path prefix in the URL of tensorboard (useful when running in certain environments such as notebooks). WIT was using a hard-coded absolute path for its calls to the TensorBoard WIT backend, which would fail when TB was launched with a path_prefix.
This fix updates the WIT backend calls (these are only done when WIT is being used inside TensorBoard) to be relative paths, so the path_prefix is correctly used by the TensorBoard request manager. This fix also uses TB's addParams method universally instead of adding query params by hand.
Tested this fix both with a standard TB instance and one with a path_prefix set and ensured that WIT works correctly in both situations now.
TensorBoard can be launched with a
--path_prefix=[path]
option to set a path prefix in the URL of tensorboard (useful when running in certain environments such as notebooks). WIT was using a hard-coded absolute path for its calls to the TensorBoard WIT backend, which would fail when TB was launched with a path_prefix.This fix updates the WIT backend calls (these are only done when WIT is being used inside TensorBoard) to be relative paths, so the path_prefix is correctly used by the TensorBoard request manager. This fix also uses TB's addParams method universally instead of adding query params by hand.
Tested this fix both with a standard TB instance and one with a path_prefix set and ensured that WIT works correctly in both situations now.
Fixes #190 and https://github.com/tensorflow/tensorboard/issues/5472