aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorboard/components/tf_distribution_dashboard/tf-distribution-dashboard.html
blob: 76de74273f269c4b33dece0e4a3fc7b218043b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!--
@license
Copyright 2016 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../tf-backend/tf-backend.html">
<link rel="import" href="../tf-color-scale/tf-color-scale.html">
<link rel="import" href="../tf-dashboard-common/tf-dashboard.html">
<link rel="import" href="../tf-dashboard-common/tf-option-selector.html">
<link rel="import" href="../tf-dashboard-common/tf-panes-helper.html">
<link rel="import" href="../tf-dashboard-common/tf-sidebar-helper.html">
<link rel="import" href="../tf-imports/lodash.html">
<link rel="import" href="../vz-distribution-chart/vz-distribution-chart.html">
<link rel="import" href="../iron-collapse/iron-collapse.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">

<!--
tf-distribution-dashboard is a complete frontend that loads runs from a backend,
and creates chart panes that display data for those runs.

It provides a x type selector and the normal tf-sidebar-helper options, by
which the user can customize how data is organized and displayed.

Each chart has a button that can toggle whether it is "expanded"; expanded
charts are larger.

Organizationally, the #plumbing div contains components that have no concrete
manifestation and just effect data bindings or data loading. The .sidebar div
contains shared controls provided by tf-sidebar-helper. The .center div
contains vz-distribution-charts embedded inside tf-panes-helper's.
-->
<dom-module id="tf-distribution-dashboard">
  <template>
    <div id="plumbing">
      <tf-color-scale
        id="colorScale"
        runs="[[runs]]"
        out-color-scale="{{_colorScale}}"
      ></tf-color-scale>
    </div>

    <tf-dashboard-layout>
      <div class="sidebar">
        <tf-sidebar-helper
          backend="[[backend]]"
          categories="{{_categories}}"
          color-scale="[[_colorScale]]"
          run2tag="[[run2tag]]"
          runs="[[runs]]"
          selected-runs="{{_selectedRuns}}"
          >
        <div class="sidebar-section">
          <tf-option-selector
            id="xTypeSelector"
            name="Horizontal Axis"
            selected-id="{{_xType}}"
            >
            <paper-button id="step">step</paper-button>
            <paper-button id="relative">relative</paper-button>
            <paper-button id="wall_time">wall</paper-button>
          </tf-option-selector>
        </div>
        </tf-sidebar-helper>
      </div>

      <div class="center">
        <tf-panes-helper
          categories="[[_categories]]"
          color-scale="[[_colorScale]]"
          data-type="[[dataType]]"
          data-provider="[[dataProvider]]"
          data-not-found="[[dataNotFound]]"
          run2tag="[[run2tag]]"
          selected-runs="[[_selectedRuns]]"
          repeat-for-runs
          >
          <template>
            <vz-distribution-chart
              x-type="[[_xType]]"
              color-scale="[[_colorScale]]"
              ></vz-distribution-chart>
          </template>
        </tf-panes-helper>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
  </template>

  <script>
    import {DashboardBehavior} from "../tf-dashboard-common/dashboard-behavior";
    import {ReloadBehavior} from "../tf-dashboard-common/reload-behavior";
    import {BackendBehavior} from "../tf-backend/behavior";

    Polymer({
      is: "tf-distribution-dashboard",
      factoryImpl: function(backend) {
        this.backend = backend;
      },
      behaviors: [
        DashboardBehavior("distributions"),
        ReloadBehavior("tf-chart-scaffold"),
        BackendBehavior,
      ],
      properties: {
        backend: Object,
        _xType: {
          type: String,
          value: "step"
        },
        dataType: {
          type: Object,
          value: "compressedHistogram",
        },
      },
    });
  </script>
</dom-module>