how to fix TensorBoard 'tensorflow.python.framework.errors_impl.NotFoundError: logdir not found' failure
The logdir path the process uses is not the path you inspected: print the resolved absolute logdir from inside the job, because relative paths resolve against the job's working directory, which differs between notebooks, schedulers, and containers. Use when a TensorBoard setup where the writer or the dashboard reports logdir not found. Not for a logdir that exists but sits on an unmounted volume in the container,.
TL;DR
The logdir path the process uses is not the path you inspected: print the resolved absolute logdir from inside the job, because relative paths resolve against the job's working directory, which differs between notebooks, schedulers, and containers. Point TensorBoard and the writer at one absolute path, create it before the writer starts, and the not-found error clears.
how to fix TensorBoard 'tensorflow.python.framework.errors_impl.NotFoundError: logdir not found' failureUse this when
- The run or call fails with this symptom: NotFoundError: logdir not found from TensorFlow when starting TensorBoard logging.
- You are working on a TensorBoard setup where the writer or the dashboard reports logdir not found and the failure repeats on the same run or configuration.
- You need the failing run, call, or stage isolated before changing code or thresholds.
Not for this skill when
- A logdir that exists but sits on an unmounted volume in the container, where the fix is the mount rather than the path.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.
Steps
- Print the absolute resolved logdir from the failing process, not from your shell. Verify: the true path is known
- Check whether that path exists and which working directory the job actually runs with. Verify: the path mismatch is located
- Create the directory in the job's startup or switch configuration to an absolute shared path. Verify: the writer creates event files at the expected location
- Launch TensorBoard against the same absolute path and confirm the run appears. Verify: the dashboard lists the run
Variant phrasings
tensorboard logdir not found notfounderror
The verbatim phrasing.
tensorflow logdir not found relative path working directory
The relative-path phrasing.
tensorboard run not appearing logdir mismatch fix
The mismatch phrasing.
Compatibility: TensorBoard logdir configuration in training and serving environments
Why it happens
Relative logdirs are resolved per process, so the writer, the dashboard, and the developer's shell can each mean a different directory by the same string. The not-found error reports the name, not the resolution, which is why the directory can look present while the job disagrees.
Edge cases / pitfalls
- In containers, a logdir on the overlay filesystem vanishes with the container; mount a volume for runs you keep.
- TensorBoard caches its run list; a refresh or restart is needed before judging a fixed path.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_uGoqrytEqbIS8UtCOcmC6g