-
Notifications
You must be signed in to change notification settings - Fork 235
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
GCI "Filter layers that are exclusive to selected frameworks" #418
Conversation
Hey @ZeroZeroJedenJeden few suggestions before I do a full review.
|
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.
@ZeroZeroJedenJeden Excellent work overall, couple of code-wise suggestions:
ide/static/js/filterbar.js
Outdated
<div className="form-group pull-right"> | ||
<div className="dropdown"> | ||
<button id="topbar-icon" className="btn btn-default dropdown-toggle form-control" data-toggle="dropdown"> | ||
<span className="glyphicon glyphicon-list-alt" aria-hidden="true"></span> |
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.
<span className="glyphicon glyphicon-list-alt" aria-hidden="true"></span> | |
<span className="glyphicon glyphicon-filter" aria-hidden="true"></span> |
I think this should look better
ide/static/js/pane.js
Outdated
); | ||
} | ||
} | ||
|
||
// class FilterBar extends React.Component { |
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.
Please remove comments if you're sure about your changes.
ide/static/js/content.js
Outdated
@@ -1310,6 +1311,7 @@ class Content extends React.Component { | |||
<Login setUserId={this.setUserId} setUserName={this.setUserName}></Login> | |||
<h5 className="sidebar-heading insert-layer-title"> | |||
<input id="layer-search-input" placeholder="Search for layer"></input> | |||
<FilterBar /> |
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.
Please resolve the below webpack error (line 1314):
content.js:1314:2 error Mixed spaces and tabs no-mixed-spaces-and-tabs
ide/static/js/filterbar.js
Outdated
</ul> | ||
</div> | ||
</div> | ||
</div> |
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.
Please resolve the below webpack error (lines 96 and 97):
filterbar.js:96:2 error Mixed spaces and tabs no-mixed-spaces-and-tabs
filterbar.js:97:2 error Mixed spaces and tabs no-mixed-spaces-and-tabs
ide/static/js/pane.js
Outdated
// </ul> | ||
// </div> | ||
// </div> | ||
// </div> |
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.
Please resolve the below webpack error (lines 560 and 561). Just removing the comments would do as well, but mentioning it anyway:
pane.js:560:2 error Mixed spaces and tabs no-mixed-spaces-and-tabs
pane.js:561:2 error Mixed spaces and tabs no-mixed-spaces-and-tabs
@ZeroZeroJedenJeden That's some excellent work, well done! I have a few comments based on my observations:
@Ram81 @yashdusing It'll be great if you guys can review this functionality as well. |
@thatbrguy If you can, check the work. |
The functionality's great. But I think :
|
@yashdusing I see it, but to do it, I'll modify search bar placing system. Search bar is not my GCI task, so I wait what @thatbrguy will say. |
@ZeroZeroJedenJeden Hey, good progress! However there are still some layer discrepancies. For instance, Please go through |
My brain has stopped working. I got elements for filter from #409 PR without verification, where Input missing, LRN only for cafee and Crop for all frameworks. I going to rewrite all arrays with official domumentacions. |
|
|
@ZeroZeroJedenJeden Glad that you're actively verifying the layers, good work! @yashdusing Could you verify if the filter functionality has all the proper layers for each framework? I may have missed something. I got a few points as well: |
I have the same display issue as @thatbrguy so please fix that bug. |
I pushed |
@ZeroZeroJedenJeden Hello. Yes, placement looks perfect now. About the layers, @yashdusing and I will verify if everything has been properly added and let you know if something's missing. |
@ZeroZeroJedenJeden Please look into the comments I've made and fix those. Apart from those comments : LGTM |
ide/static/js/filterbar.js
Outdated
"Bidirectional_Button", "RepeatVector_Button", "Masking_Button", "Permute_Button", "InnerProduct_Button", | ||
"Deconvolution_Button", "Regularization_Button", "Softsign_Button", "Upsample_Button", "Pooling_Button", | ||
"LocallyConnected_Button", "Input_Button", "Convolution_Button", "LRN_Button", "DepthwiseConv_Button", "Flatten_Button", | ||
"Reshape_Button", "Concat_Button", "Softplus_Button", "HardSigmoid_Button", "Dropout_Button"]; |
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.
https://keras.io/layers/merge/
Also, these correspond to eltwise , I think
ide/static/js/filterbar.js
Outdated
"InnerProduct_Button", "Deconvolution_Button", "ELU_Button", "Dropout_Button", | ||
"Pooling_Button", "LocallyConnected_Button", "Sigmoid_Button", | ||
"Convolution_Button", "TanH_Button", | ||
"Input_Button", "Flatten_Button", "Reshape_Button", "Concat_Button"]; |
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.
List of supported TF layers (as per dict) : Input, Convolution, Pooling, DepthwiseConv, InnerProduct, LRN, Concat, Flatten, BatchNorm, DeConv, Sigmoid, Softplus, Softsign, Elu, Relu, Softmax, TanH, Selu, Dropout, Eltwise
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.
Remove the existing layers and put in these. Also, go through 'import_graphdef.py' once just in case I missed any layers .
ide/static/js/filterbar.js
Outdated
"Reshape_Button", "BatchReindex_Button", "Split_Button", "Concat_Button", "Eltwise_Button", "Filter_Button", | ||
"Reduction_Button", "Silence_Button", "ArgMax_Button", "Softmax_Button", "MultinomialLogisticLoss_Button", | ||
"InfogainLoss_Button", "SoftmaxWithLoss_Button", "EuclideanLoss_Button", "HingeLoss_Button", | ||
"SigmoidCrossEntropyLoss_Button", "Accuracy_Button", "ContrastiveLoss_Button", "Data_Button", "Crop_Button"]; |
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.
You forgot Threshold Relu, Slice, Python layers. Apart from these, I didn't find any layers that were missed.
@yashdusing So I have problem. I can't find |
@ZeroZeroJedenJeden Looks good to me, excellent work 👍 |
@ZeroZeroJedenJeden style gets messed up on chrome, can you fix this. |
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.
@ZeroZeroJedenJeden Minor changes. Functionality wise LGTM
ide/static/js/content.js
Outdated
@@ -1308,17 +1309,20 @@ class Content extends React.Component { | |||
/> | |||
<h5 className="sidebar-heading">LOGIN</h5> | |||
<Login setUserId={this.setUserId} setUserName={this.setUserName}></Login> | |||
<h5 className="sidebar-heading"> | |||
<div id="insert-layer-sign">INSERT LAYER</div> |
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.
Correct the Indentation
</h5> | ||
<Pane | ||
handleClick = {this.handleClick} | ||
setDraggingLayer = {this.setDraggingLayer} | ||
/> | ||
<div className="text-center"> | ||
<Tabs selectedPhase={this.state.selectedPhase} changeNetPhase={this.changeNetPhase} /> | ||
<Tabs selectedPhase={this.state.selectedPhase} changeNetPhase={this.changeNetPhase} /> |
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.
Fix the indentation
ide/static/js/filterbar.js
Outdated
"Deconvolution_Button", "Regularization_Button", "Softsign_Button", "Upsample_Button", "Pooling_Button", | ||
"LocallyConnected_Button", "Input_Button", "Convolution_Button", "LRN_Button", "DepthwiseConv_Button", "Flatten_Button", | ||
"Reshape_Button", "Concat_Button", "Softplus_Button", "HardSigmoid_Button", "Dropout_Button", "Eltwise_Button"]; | ||
var TensorFlowLayers = ["Input_Button", "Convolution_Button", "Pooling_Button", "DepthwiseConv_Button", "InnerProduct_Button", |
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.
Add a new line above this
ide/static/js/filterbar.js
Outdated
"LRN_Button", "Concat_Button", "Flatten_Button", "BatchNorm_Button", "Deconvolution_Button", "Sigmoid_Button", | ||
"Softplus_Button", "Softsign_Button", "ELU_Button", "ReLU_Button", "Softmax_Button", "TanH_Button", "SELU_Button", | ||
"Dropout_Button", "Eltwise_Button"]; | ||
var CaffeLayers = ["ImageData_Button", "HDF5Data_Button", "HDF5Output_Button", "Input_Button", "WindowData_Button", |
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.
Add a newline above this
ide/static/js/filterbar.js
Outdated
@@ -0,0 +1,103 @@ | |||
import React from 'react'; |
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.
Rename the file to filterBar.js
ide/static/js/filterbar.js
Outdated
var CheckBoxC = document.getElementById("CheckBoxC"); | ||
var visible = []; | ||
|
||
let CheckBox = document.getElementById(cbid); |
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.
Follow the camel case style for variable names
ide/static/js/filterbar.js
Outdated
visible = visible.concat(CaffeLayers); | ||
} | ||
|
||
for (let elem of $('.drowpdown-button')) { |
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.
Uneven Indentation
ide/static/js/filterbar.js
Outdated
</ul> | ||
</div> | ||
</div> | ||
</div> |
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.
Again Indentation fixes
ide/static/css/searchbar_style.css
Outdated
@@ -16,8 +17,8 @@ | |||
|
|||
#layer-search-input { | |||
position: absolute; | |||
top: 36px; | |||
left: 20px; | |||
top: 2px; |
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.
Rather than hardcoding the values you can assign relative values.
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.
@ZeroZeroJedenJeden try using relative values to see if that solves the layout bug
ide/static/js/filterbar.js
Outdated
if(id == visible[j]){ | ||
elem.classList.remove("hide"); | ||
j = visible.length + 1; | ||
}else{ |
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.
Put else
on newline and add space after else
ide/static/js/filterbar.js
Outdated
for (let elem of $('.drowpdown-button')) { | ||
for (let j = 0; j < visible.length; j++){ | ||
let id = elem.id; | ||
if(id == visible[j]){ |
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.
space after )
and before {
ide/static/js/filterbar.js
Outdated
<li> | ||
<a className="btn" onClick={this.changeEvent.bind(this, "CheckBoxA")}> | ||
<label className="filter">Keras</label> | ||
<input type="checkbox" id="CheckBoxA" value="A" onClick={this.changeEvent.bind(this, "CheckBoxA")} /> |
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.
Rename checkbox ids to be more specific for functionality
@Ram81 About this "style bug" on chrome. On my chrome all looks good. Try clean chrome cache, like |
@ZeroZeroJedenJeden the size of filter button still looks to big. Is it same for you? |
@Ram81 The size of filter button is the same size as topBar buttons (import, export etc). |
Hello @ZeroZeroJedenJeden ! It seems that this task is still not yet done and you have simultaneously taken up another task for fixing layer chopiness. We would like you to finish this task up first and have the PR approved before taking up the other one as it violates the rule of taking up more than one tasks at a time. |
@yashdusing Right, but after @thatbrguy "LGTM"comment I could take next task on GCI site. I took next task and after this @Ram81 wrote comments to this task. |
@ZeroZeroJedenJeden sorry for the confusion. I thought that the PR wasn't approved so the task might not have the approval. You can continue your work on the layer chopiness. Ask for help if you're stuck |
To @Ram81 big button comment. Are this look better? |
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.
@ZeroZeroJedenJeden LGTM 👍
Added filters to show/hide layers in layers bar to selected framework.