tensorflow / tensorflow/tensorboard

logdir should default to .

Open
#1,392 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

My personal workflow:

  1. Open the folder with the tensorboard files in it
  2. Open a command window from this folder (this folder as root)
  3. type in tensorboard --logdir . manually
  4. switch to the browser

It seems so minor but you won't believe how tiring it is to type --logdir . every time.

For me it would be a huge quality of life improvement to make logdir default to the current folder (.).

While this is my personal workflow and for sure there are many other workflows I don't see any reason why defaulting to the current folder would interfere with any other workflow.

Feature request: logdir should default to current folder (.) if not specified

The only change needed seems to be in tensorboard.tensorboard.plugins.core.core_plugin:

From

 def fix_flags(self, flags):
    """Fixes standard TensorBoard CLI flags to parser."""
    if not flags.db and not flags.logdir:
        raise ValueError('A logdir or db must be specified. '
                    'For example `tensorboard --logdir mylogdir` '
                    'or `tensorboard --db sqlite:~/.tensorboard.db`. '
                    'Run `tensorboard --helpfull` for details and examples.')
    flags.logdir = os.path.expanduser(flags.logdir)

to something like

 def fix_flags(self, flags):
    """Fixes standard TensorBoard CLI flags to parser."""
    flags.logdir = os.path.expanduser('.' if not flags.db and not flags.logdir else flags.logdir)

not sure if something special about flags.db needs to be done.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tensorboard.tensorboard.plugins.core.core_plugin.fix_flags and inspect how flags.db and flags.logdir are handled. Verify that an omitted logdir uses the current folder while database-backed startup remains valid; done when the CLI no longer requires --logdir for the stated workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.