@@ -76,25 +76,25 @@ <h2>Continue...</h2>
76
76
force-expansion-node-name ="[[_forceExpansionNodeName]] ">
77
77
</ tf-op-selector >
78
78
</ div >
79
- < div class =" sidebar-section " >
79
+ < div >
80
80
< tf-session-runs-view
81
81
id ="sessionRunsView "
82
82
latest-session-run ="[[_latestSessionRun]] "
83
83
session-run-key-to-device-names ="[[_sessionRunKey2DeviceNames]] "
84
- sole-active ="[[_sessionRunSoleActive]] ">
84
+ sole-active ="[[_sessionRunSoleActive]] "
85
+ node-or-tensor-clicked ="[[_createFeedFetchTargetClickedHandler()]] ">
85
86
</ tf-session-runs-view >
86
- < br />
87
- < div >
88
- < paper-button raised class ="continue-button " on-click ="_step ">
89
- < span > [[_stepButtonText]]</ span >
90
- </ paper-button >
91
- < paper-button
92
- raised
93
- class ="continue-button "
94
- on-click ="_openContinueDialog ">
95
- < span > [[_continueButtonText]]</ span >
96
- </ paper-button >
97
- </ div >
87
+ </ div >
88
+ < div >
89
+ < paper-button raised class ="continue-button " on-click ="_step ">
90
+ < span > [[_stepButtonText]]</ span >
91
+ </ paper-button >
92
+ < paper-button
93
+ raised
94
+ class ="continue-button "
95
+ on-click ="_openContinueDialog ">
96
+ < span > [[_continueButtonText]]</ span >
97
+ </ paper-button >
98
98
</ div >
99
99
< div class ="container ">
100
100
< tf-graph-loader id ="loader "
@@ -151,7 +151,7 @@ <h2>Continue...</h2>
151
151
</ div >
152
152
153
153
< div id ="tensor-data " class ="tensor-data ">
154
- < div class ="debugger-section-title "> Tensor Value Summary </ div >
154
+ < div class ="debugger-section-title "> Tensor Value Overview </ div >
155
155
< tf-tensor-data-summary
156
156
latest-tensor-data ="[[_latestTensorData]] "
157
157
expand-handler ="[[_createTensorDataExpandHandler()]] ">
@@ -221,6 +221,10 @@ <h2>Continue...</h2>
221
221
max-width : 540px ;
222
222
margin : 80px auto 0 auto;
223
223
}
224
+ .sidebar {
225
+ position : relative;
226
+ height : 100% ;
227
+ }
224
228
.center {
225
229
position : relative;
226
230
height : 100% ;
@@ -627,7 +631,8 @@ <h2>Continue...</h2>
627
631
const gatedGrpcTensors = response [ 'gated_grpc_tensors' ] [ deviceName ] ;
628
632
for ( let i = 0 ; i < gatedGrpcTensors . length ; ++ i ) {
629
633
debugWatches . push (
630
- { 'node_name' : deviceName + '/' + gatedGrpcTensors [ i ] [ 0 ] ,
634
+ { 'device_name' : deviceName ,
635
+ 'node_name' : gatedGrpcTensors [ i ] [ 0 ] ,
631
636
'op_type' : gatedGrpcTensors [ i ] [ 1 ] ,
632
637
'output_slot' : gatedGrpcTensors [ i ] [ 2 ] ,
633
638
'debug_op' : gatedGrpcTensors [ i ] [ 3 ] } ) ;
@@ -658,18 +663,45 @@ <h2>Continue...</h2>
658
663
const state = checked ? 'break' : 'disable' ;
659
664
// TODO(cais): Investigate why this is fired twice sometimes.
660
665
this . _requestBreakpointStateChange (
661
- tf_debugger_dashboard . getCleanNodeName ( debugObject . node_name ) ,
666
+ tf_debugger_dashboard . getCleanNodeName (
667
+ debugObject . device_name + '/' + debugObject . node_name ) ,
662
668
debugObject . output_slot , debugObject . debug_op , state ) ;
663
669
} ) ;
664
670
} ,
671
+ _focusOnGraphNode ( deviceName , nodeName ) {
672
+ if ( deviceName != null &&
673
+ this . _activeRuntimeGraphDeviceName !== deviceName ) {
674
+ this . set ( '_activeRuntimeGraphDeviceName' , deviceName ) ;
675
+ }
676
+ this . _setTopRightRuntimeGraphsToActive ( ) ;
677
+ this . $$ ( '#graph' ) . set ( 'selectedNode' , nodeName ) ;
678
+ } ,
665
679
_createListNodeClickedHandler ( ) {
666
680
return ( ( deviceName , nodeName ) => {
667
- if ( deviceName != null &&
668
- this . _activeRuntimeGraphDeviceName !== deviceName ) {
669
- this . set ( '_activeRuntimeGraphDeviceName' , deviceName ) ;
681
+ this . _focusOnGraphNode ( deviceName , nodeName ) ;
682
+ } ) ;
683
+ } ,
684
+ _createFeedFetchTargetClickedHandler ( ) {
685
+ return ( ( graphElementName ) => {
686
+ let nodeName = graphElementName ;
687
+ // If it is a tensor name, get the node name.
688
+ if ( nodeName . indexOf ( ':' ) !== - 1 ) {
689
+ nodeName = nodeName . slice ( 0 , nodeName . indexOf ( ':' ) ) ;
690
+ }
691
+ // Find the debug watch that matches the clicked node.
692
+ const matchingDebugWatch = _ . find ( this . _debugWatches , debugWatch => {
693
+ // Take into account the possibility of base-expanded node names.
694
+ return ( debugWatch . node_name === nodeName ||
695
+ debugWatch . node_name . indexOf ( nodeName ) === 0 &&
696
+ debugWatch . node_name [ nodeName . length ] === '(' ) ;
697
+ } ) ;
698
+ if ( matchingDebugWatch == null ) {
699
+ this . _showToast (
700
+ 'Node \'' + nodeName + '\' is not in the runtime graph of the ' +
701
+ 'current Session.run or does not have a debug op attached.' ) ;
702
+ } else {
703
+ this . _focusOnGraphNode ( matchingDebugWatch . device_name , nodeName ) ;
670
704
}
671
- this . _setTopRightRuntimeGraphsToActive ( ) ;
672
- this . $$ ( '#graph' ) . set ( 'selectedNode' , nodeName ) ;
673
705
} ) ;
674
706
} ,
675
707
0 commit comments