Skip to content
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

print version with tensorboard --version #2097

Merged
merged 13 commits into from
Apr 18, 2019

Conversation

shashvatshahi1998
Copy link
Contributor

  • Issue was related to this change

  • Added version flag in main

  • Screenshots of UI changes

Issue #2087

@shashvatshahi1998
Copy link
Contributor Author

@wchargin ,@nfelt can you please review these changes.

@shashvatshahi1998
Copy link
Contributor Author

shashvatshahi1998 commented Apr 6, 2019

@nfelt , @wchargin can you please tell me my mistake?

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending the PR!

@@ -220,6 +220,9 @@ def main(self, ignored_argv=('',)):
event_file = os.path.expanduser(self.flags.event_file)
efi.inspect(self.flags.logdir, event_file, self.flags.tag)
return 0
if self.flags.version:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to define the flag in core_plugin.py. See the --inspect flag definition for an example:

parser.add_argument(
'--inspect',
action='store_true',
help='''\
Prints digests of event files to command line.
This is useful when no data is shown on TensorBoard, or the data shown
looks weird.
Must specify one of `logdir` or `event_file` flag.
Example usage:
`tensorboard --inspect --logdir mylogdir --tag loss`
See tensorboard/backend/event_processing/event_file_inspector.py for more info.\
''')

Copy link
Contributor

@thealphacod3r thealphacod3r Apr 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shashvatshahi1998 if you're not working on this can i send pr for the same??

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nfelt Defined the flag in core_plugin.py

See #2100

Copy link
Contributor Author

@shashvatshahi1998 shashvatshahi1998 Apr 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amanp592 I was also working on the issue man.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amanp592 please let @shashvatshahi1998 finish working on this PR since they've already started it, and the functionality should all be submitted as a single PR.

If you're looking for a simple issue, you could pick up #1176 which is for ensuring that if --path_prefix is used, the URL printed out includes a trailing slash. The fix for that would be changing get_url() here to add a trailing slash to the URL if there isn't one already there:

def get_url(self):
if self._auto_wildcard:
display_host = socket.gethostname()
else:
host = self._flags.host
display_host = (
'[%s]' % host if ':' in host and not host.startswith('[') else host)
return 'http://%s:%d%s' % (display_host, self.server_port,
self._flags.path_prefix)

A PR for that should also include a test to confirm the bug is fixed, which would go in

class WerkzeugServerTest(tf.test.TestCase):

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shashvatshahi1998 ohk cool sorry for that!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nfelt Thankyou for refering me #1176 i'll look what can be done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amanp592 no worries

@shashvatshahi1998
Copy link
Contributor Author

please @nfelt review it

@shashvatshahi1998
Copy link
Contributor Author

@nfelt please soomebody review this PR as its more than 4 days now .

@stephanwlee stephanwlee requested a review from nfelt April 10, 2019 15:40
@stephanwlee
Copy link
Contributor

@shashvatshahi1998 Nick is currently out of office until end of today. Since this is not urgent feature, I would like to respect his time off. Would you mind waiting one more day?

Perhaps this is urgent to you, but I do not comprehend your requirements. I would appreciate it if you could you inform me why this is urgent. Thanks!

@shashvatshahi1998
Copy link
Contributor Author

@stephanwlee there is no urgency , I can wait for one more day. Basically I was not aware of the fact that @nfelt is not available.

@shashvatshahi1998
Copy link
Contributor Author

Please @nfelt, @stephanwlee somebody reviews this PR, it's like more than 10 days that I have opened it.

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shashvatshahi1998. We don't promise any particular turnaround time on PRs, and this particular addition is not urgent (not a bugfix or pressing feature). The team reviewing these has multiple priorities and we are not available 24/7 due to holidays, weekends, etc. I'd like to ask for a bit more patience going forward - multiple pings in a short time period (in this case, 5 within 24 hours last week) is not going to increase the chance that your PR gets reviewed, it will just spam the team when we have other work that is more pressing.

As for the PR contents: this looks good, but right now trying to run tensorboard --version will print an error about needing to supply --logdir or --db flags, which shouldn't be necessary to just print the version. Can you please fix this by modifying the check in fix_flags() here:

It should be updated to something like:

if flags.version:
  pass  # Don't validate flags if we're just printing the version.
elif flags.inspect:
  ...

@shashvatshahi1998
Copy link
Contributor Author

@nfelt i have done the changes which you asked me to do then why travis cl test is failing

@nfelt
Copy link
Contributor

nfelt commented Apr 17, 2019

To fix the test, you'll need to edit core_plugin_test.py and add a version field to FakeFlags here:

class FakeFlags(object):
def __init__(
self,
inspect,
logdir='',
event_file='',
db='',
path_prefix=''):
self.inspect = inspect
self.logdir = logdir
self.event_file = event_file
self.db = db
self.path_prefix = path_prefix

You should also add a test that you can pass just version and not get a flag error, by adding a line to this test:

E.g. add the line loader.fix_flags(FakeFlags(version=True)).

@shashvatshahi1998
Copy link
Contributor Author

@nfelt done with changes told by you.

@@ -52,6 +52,7 @@ def __init__(
db='',
path_prefix=''):
self.inspect = inspect
self.version = version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to add version as a parameter to __init__().

@@ -47,11 +47,13 @@ class FakeFlags(object):
def __init__(
self,
inspect,
version,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a default value of False, and so does inspect above.

@shashvatshahi1998
Copy link
Contributor Author

@nfelt done with changes asked by you

@shashvatshahi1998
Copy link
Contributor Author

@nfelt it has passed the checks now.

@shashvatshahi1998
Copy link
Contributor Author

@nfelt I think its complete now.

@nfelt nfelt changed the title tensorboard should support --version #2087 print version with tensorboard --version Apr 18, 2019
@nfelt nfelt merged commit df4ac42 into tensorflow:master Apr 18, 2019
@shashvatshahi1998
Copy link
Contributor Author

@nfelt I want to work on more issues. Can you please give me some issues which are good for beginner?

@nfelt
Copy link
Contributor

nfelt commented Apr 20, 2019

@shashvatshahi1998 you could take a look at #2121 to update our metaclass syntax to be compatible with Python 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants