tensorflow / tensorflow/tensorboard
Tensorboard does not recognize absolute GCP storage path in projector_config
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Description
System specifications
- TensorBoard version: 0.1.8
- TensorFlow version: 1.3.0
- OS Platform and version: Ubuntu 16.04 subsystem on Windows 10 wsl
- Python version: 2.7
Problem specification
I am using a projector_config.pbtxt file to link my embedding tensors to their metadata. The config file is structured like this:
embeddings {
tensor_name: "scope/first_tensor_name:0"
metadata_path: "gs://bucket/not-logdir/first_dict"
}
embeddings {
tensor_name: "scope/second_tensor_name:0"
metadata_path: "gs://bucket/not-logdir/second_dict"
}
...
When I load the projector in tensorboard, I get the following error message:
Error fetching metadata
"gs://bucket/logdir/gs://bucket/not-logdir/first_dict" not found, or is not a file
Tensorboard uses my absolute path as a relative path.
Source code
The metadata path is fetched here and constructed to an absolute path here:
def _rel_to_abs_asset_path(fpath, config_fpath):
fpath = os.path.expanduser(fpath)
if not os.path.isabs(fpath):
return os.path.join(os.path.dirname(config_fpath), fpath)
return fpath
This snippet shows that the path should only be made absolute if it is not an absolute path already.
The os.path.isabs() function however fails to detect if a GCP storage path is absolute.
Is there another way to specify a metadata path outside of the logdir on GCP storage or should this be fixed?
The relevant code seems to be unchanged between my version 0.1.8 and the current version 1.6.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tensorboard/plugins/projector/projector_plugin.py, especially _rel_to_abs_asset_path and the metadata-fetching code linked in the issue. Trace how gs:// paths are classified and joined with the log directory; done means an external GCP storage path remains usable without being prefixed by the log directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100