-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
data: expose downsampling preferences to plugins #3271
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: We add a `sampling_hints` attribute to the `TBContext` magic container, which is populated with the parsed form of the `--samples_per_plugin` flag. Existing plugins’ generic data modes are updated to read from this map instead of using hard-coded thresholds. Test Plan: This change is not actually observable as is, because the multiplexer data provider ignores its downsampling argument. But after patching in a change to make the data provider respect the downsampling argument, this change has the effect that increasing the `--samples_per_plugin` over the default (e.g., `images=20`) now properly increases the number of samples shown in generic data mode, whereas previously it had no effect. wchargin-branch: data-downsampling-flag wchargin-source: 50998be15abd790a0915458bac76091c79823f0f
wchargin
commented
Feb 20, 2020
@@ -238,6 +242,7 @@ def TensorBoardWSGIApp( | |||
multiplexer=deprecated_multiplexer, | |||
assets_zip_provider=assets_zip_provider, | |||
plugin_name_to_instance=plugin_name_to_instance, | |||
sampling_hints=_parse_samples_per_plugin(flags), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing this twice felt easier than adding an extra parameter to this
method, but I’d be happy to change that if others object.
wchargin
requested review from
nfelt and
stephanwlee
and removed request for
nfelt
February 20, 2020 21:32
(Reassigning just to spread load.) |
stephanwlee
approved these changes
Feb 21, 2020
wchargin
added a commit
that referenced
this pull request
Aug 18, 2020
Summary: Before `--samples_per_plugin` existed, the only way to change the sampling thresholds was to patch `application.py` manually. But the flag has been the right way to do this since #1138, and manual patching has been insufficient since the flag value was exposed to plugins in #3271. There’s no need to discuss this implementation detail any more. wchargin-branch: readme-remove-application-reference wchargin-source: b79027ec8b279537bdf38f7b5d7f36cf5dd38498
wchargin
added a commit
that referenced
this pull request
Aug 18, 2020
Summary: Before `--samples_per_plugin` existed, the only way to change the sampling thresholds was to patch `application.py` manually. But the flag has been the right way to do this since #1138, and manual patching has been insufficient since the flag value was exposed to plugins in #3271. There’s no need to discuss this implementation detail any more. wchargin-branch: readme-remove-application-reference
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
We add a
sampling_hints
attribute to theTBContext
magic container,which is populated with the parsed form of the
--samples_per_plugin
flag. Existing plugins’ generic data modes are updated to read from this
map instead of using hard-coded thresholds.
Test Plan:
This change is not actually observable as is, because the multiplexer
data provider ignores its downsampling argument. But after patching in a
change to make the data provider respect the downsampling argument, this
change has the effect that increasing the
--samples_per_plugin
overthe default (e.g.,
images=20
) now properly increases the number ofsamples shown in generic data mode, whereas previously it had no effect.
wchargin-branch: data-downsampling-flag