aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Dandelion Mané <dandelion@google.com>2017-02-28 13:22:45 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-28 13:46:29 -0800
commit44a86ac67f0bc1789d4e1054df1050c5c12c7ecb (patch)
treedd030fc7ab44c91c1ddfd51dc8b9fe723cef93f1
parent00dae17b9d1fb1cff86eae2cf0a05f36f2443816 (diff)
Remove the "Legacy Underscore Categorization" option from TensorBoard.
I want to clean up the UI, and I don't think it's worth supporting this feature anymore. Change: 148807695
-rw-r--r--tensorflow/tensorboard/components/tf_dashboard_common/categorizer.ts9
-rw-r--r--tensorflow/tensorboard/components/tf_dashboard_common/test/categorizerTest.ts16
-rw-r--r--tensorflow/tensorboard/components/tf_dashboard_common/tf-categorizer.html26
3 files changed, 1 insertions, 50 deletions
diff --git a/tensorflow/tensorboard/components/tf_dashboard_common/categorizer.ts b/tensorflow/tensorboard/components/tf_dashboard_common/categorizer.ts
index e8a9751f08..42e7cbcff4 100644
--- a/tensorflow/tensorboard/components/tf_dashboard_common/categorizer.ts
+++ b/tensorflow/tensorboard/components/tf_dashboard_common/categorizer.ts
@@ -51,19 +51,10 @@ module Categorizer {
*/
export var topLevelNamespaceCategorizer: Categorizer = splitCategorizer(/\//);
- // Try to produce good categorizations on legacy graphs, which often
- // are namespaced like l1_foo/bar or l2_baz/bam.
- // If there is no leading underscore before the first forward slash,
- // then it behaves the same as topLevelNamespaceCategorizer
- export var legacyUnderscoreCategorizer: Categorizer =
- splitCategorizer(/[\/_]/);
-
export function fallbackCategorizer(s: string): Categorizer {
switch (s) {
case 'TopLevelNamespaceCategorizer':
return topLevelNamespaceCategorizer;
- case 'LegacyUnderscoreCategorizer':
- return legacyUnderscoreCategorizer;
default:
throw new Error('Unrecognized categorization strategy: ' + s);
}
diff --git a/tensorflow/tensorboard/components/tf_dashboard_common/test/categorizerTest.ts b/tensorflow/tensorboard/components/tf_dashboard_common/test/categorizerTest.ts
index c28e1851fd..ea149fda47 100644
--- a/tensorflow/tensorboard/components/tf_dashboard_common/test/categorizerTest.ts
+++ b/tensorflow/tensorboard/components/tf_dashboard_common/test/categorizerTest.ts
@@ -64,22 +64,6 @@ module Categorizer {
});
});
- describe('legacyUnderscoreCategorizer', () => {
- it('splits by shorter of first _ or /', () => {
- let tags = [
- 'l0_bar/foo', 'l0_bar/baz', 'l0_foo/wob', 'l1_zoink/bla',
- 'l1_wibble/woz', 'l1/foo_woink', 'l2/wozzle_wizzle'
- ];
- let actual = legacyUnderscoreCategorizer(tags);
- let expected = [
- {name: 'l0', tags: ['l0_bar/baz', 'l0_bar/foo', 'l0_foo/wob']},
- {name: 'l1', tags: ['l1/foo_woink', 'l1_wibble/woz', 'l1_zoink/bla']},
- {name: 'l2', tags: ['l2/wozzle_wizzle']},
- ];
- assert.deepEqual(actual, expected);
- });
- });
-
describe('customCategorizer', () => {
function noFallbackCategorizer(tags: string[]): Category[] {
return [];
diff --git a/tensorflow/tensorboard/components/tf_dashboard_common/tf-categorizer.html b/tensorflow/tensorboard/components/tf_dashboard_common/tf-categorizer.html
index ffe11a8899..8ff95b03c6 100644
--- a/tensorflow/tensorboard/components/tf_dashboard_common/tf-categorizer.html
+++ b/tensorflow/tensorboard/components/tf_dashboard_common/tf-categorizer.html
@@ -46,11 +46,6 @@ categories are exclusive.
<div class="inputs">
<tf-regex-group id="regexGroup" regexes="{{regexes}}"></tf-regex-group>
</div>
- <div id="underscore-categorization">
- <paper-checkbox
- checked="{{splitOnUnderscore}}"
- >Split on underscores</paper-checkbox>
- </div>
<style>
:host {
display: block;
@@ -60,9 +55,6 @@ categories are exclusive.
--paper-checkbox-unchecked-color: var(--paper-grey-600);
font-size: 14px;
}
- #underscore-categorization {
- color: var(--paper-grey-700);
- }
</style>
</template>
<script src="categorizer.js"></script>
@@ -75,14 +67,7 @@ categories are exclusive.
categoriesAreExclusive: {type: Boolean, value: true},
fallbackCategorizer: {
type: String,
- computed: "chooseFallbackCategorizer(splitOnUnderscore)"
- },
- splitOnUnderscore: {
- type: Boolean,
- notify: true,
- value: TF.URIStorage.getBooleanInitializer('splitOnUnderscore',
- false),
- observer: '_splitOnUnderscoreObserver'
+ value: "TopLevelNamespaceCategorizer",
},
categorizer: {
type: Object,
@@ -105,15 +90,6 @@ categories are exclusive.
this._setCategories(categories);
})
},
- chooseFallbackCategorizer: function(splitOnUnderscore) {
- if (splitOnUnderscore) {
- return "LegacyUnderscoreCategorizer";
- } else {
- return "TopLevelNamespaceCategorizer";
- }
- },
- _splitOnUnderscoreObserver: TF.URIStorage.getBooleanObserver(
- 'splitOnUnderscore', false)
});
</script>
</dom-module>