-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing multiple logdirs doesn't work (and raises warning about "Conflict for name") #179
Comments
This is a design issue and not just a simple technical bug. Here's why: If we have path/to/logdir/run1, path/to/logdir/run2, and you pass --logdir=path/to/logdir, you want the run names for run1 and run2 to be "run1" and "run2", naturally enough. But suppose there are events in path/to/logdir too. What should we call that run? Borrowing from unix conventions, we called it ".". However, if you pass two unnamed logdirs, they both get auto-assigned "." and that creates the conflict. Possibly we should fix this by requiring explicit names via the colon any time multiple logdirs are passed. Going to mark this "contributiosn welcome". @colinmorris if you come up with a solution you like, feel free to send a pull request. |
@colinmorris you can attach pdb as follows: diff --git a/tensorboard/backend/event_processing/event_multiplexer.py b/tensorboard/backend/event_processing/event_multiplexer.py
index 8a71f82..66e576a 100644
--- a/tensorboard/backend/event_processing/event_multiplexer.py
+++ b/tensorboard/backend/event_processing/event_multiplexer.py
@@ -124,6 +124,7 @@ class EventMultiplexer(object):
if name in self._paths and self._paths[name] != path:
# TODO(danmane) - Make it impossible to overwrite an old path with
# a new path (just give the new path a distinct name)
+ import pdb; pdb.set_trace() # XXX BREAKPOINT
tf.logging.warning('Conflict for name %s: old path %s, new path %s',
name, self._paths[name], path)
tf.logging.info('Constructing EventAccumulator for %s', path) (You must invoke with |
For what it's worth, I used to run into this all the time, too: I would That said, I do recognize that this is just a workaround, and would be happy to see a clean solution to this problem. :-) |
I would love this flag to be more unix-y, such that I can run something like The current syntax gets extremely tiring when I have a folder with many runs and need to start tensorboard with few individual runs to compare (which I need to do because tensorboard loads runs so slowly). The alternative with a folder with symlinks is just as tiring for my use-case. |
Is there a new way of get around this issue in tensorflow2.0-beta? |
I would love that, too.
Nothing new, no, though if you’re willing to add a shell function to # usage: multitb LOGDIR [LOGDIR...]
# runs TensorBoard with a comma-separated list of all provided logdirs
multitb() (
set -eu
if [ $# -eq 0 ]; then
printf >&2 'fatal: provide at least one logdir\n'
return 1
fi
tmpdir="$(mktemp -d)"
for arg; do
case "${arg}" in
/*) ln -s "${arg}" "${tmpdir}/" ;;
*) ln -s "${PWD}/${arg}" "${tmpdir}/" ;;
esac
done
exit_code=0
\command ls -l "${tmpdir}"
printf 'tensorboard --logdir %s\n' "${tmpdir}"
tensorboard --logdir "${tmpdir}" || exit_code=$?
# This really should be 'find -H "${tmpdir}" -type l -delete` to
# account for logdirs whose names start with `.`, which should
# behave correctly on any POSIX system, but it is much more clear
# that the version below cannot under any circumstances delete the
# underlying data (e.g., with non-POSIX-compliant `find`(1)).
rm "${tmpdir}"/*
rmdir "${tmpdir}"
return "${exit_code}"
) Then running This should work in any POSIX shell (e.g., |
so far I do
I don't understand ... why they are named based on the dirnames, not filenames, like |
Works, as long as your paths don’t have any funny characters in them.
Two reasons:
|
I see, that seems legit. so, for the first example in this thread |
If you have directories The names |
the point is, the original author may have millions of other directories under I am not misunderstanding the event files structure. I am assuming the original author has files like |
Here's a simple way to make this work that avoids the overlapping run names issue. We could add another flag It errors if the The run names will look as if you ran |
I'd be happy to try implementing this if I get a go-ahead for this design from a maintainer. |
The following case should also be considered: --logdir /local/folder,gs://bucket/path A combination of local folders and training data in GCP buckets. |
These work:
But when I run this:
I get a warning like this repeatedly printed:
In tensorboard, only one run is shown.
I installed
tensorflow-tensorboard
using pip, and the version is 0.1.2(I tried debugging, but the warning gets raised in a separate daemon thread, and I wasn't able to figure out how to get pdb to attach to it)
The text was updated successfully, but these errors were encountered: