microsoft / nni
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 10% duplication:
    • 59,598 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 6,369 duplicated lines
  • 457 duplicates
system10% (6,369 lines)
Duplication per Extension
py11% (4,315 lines)
ts10% (1,419 lines)
tsx8% (449 lines)
yml16% (98 lines)
js9% (64 lines)
scss<1% (12 lines)
css6% (12 lines)
Duplication per Component (primary)
nni/algorithms13% (2,291 lines)
ts/nni_manager11% (1,291 lines)
nni/tools14% (750 lines)
ts/webui7% (665 lines)
nni/retiarii8% (541 lines)
nni/compression8% (275 lines)
nni/nas11% (250 lines)
pipelines23% (82 lines)
nni/experiment5% (71 lines)
nni/common5% (70 lines)
nni7% (44 lines)
pipelines/templates11% (16 lines)
ROOT3% (12 lines)
nni/runtime1% (11 lines)
nni/feature_engineering0% (0 lines)
ts/jupyter_extension0% (0 lines)

Duplication Between Components (50+ lines)

G nni/algorithms nni/algorithms nni/retiarii nni/retiarii nni/algorithms--nni/retiarii 218 nni/compression nni/compression nni/algorithms--nni/compression 147 nni/nas nni/nas nni/nas--nni/retiarii 186 ts/nni_manager ts/nni_manager ts/webui ts/webui ts/nni_manager--ts/webui 144 nni/common nni/common nni nni nni/common--nni 54

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 457 duplicates...
Size#FoldersFilesLinesCode
146 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
memory.py
memory.py
15:227 (100%)
15:227 (100%)
view
93 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
103:266 (36%)
87:250 (39%)
view
60 x 2 nni/algorithms/nas/pytorch/classic_nas
nni/algorithms/nas/tensorflow/classic_nas
mutator.py
mutator.py
124:221 (59%)
120:217 (60%)
view
57 x 2 nni/nas/pytorch
nni/retiarii/oneshot/pytorch
utils.py
utils.py
32:141 (60%)
15:124 (77%)
view
39 x 2 ts/nni_manager/training_...tes/frameworkcontroller
ts/nni_manager/training_...environments/kubernetes
frameworkcontrollerTrainingService.ts
frameworkcontrollerEnvironmentService.ts
490:538 (10%)
236:284 (17%)
view
36 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
agent.py
agent.py
97:157 (24%)
111:169 (24%)
view
32 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
agent.py
agent.py
17:52 (21%)
28:63 (21%)
view
31 x 2 nni/retiarii/converter
nni/retiarii/converter
utils.py
utils.py
141:178 (18%)
212:250 (18%)
view
28 x 2 nni/nas/pytorch
nni/nas/tensorflow
utils.py
utils.py
144:210 (29%)
52:83 (40%)
view
28 x 2 ts/nni_manager/training_service/reusable/aml
ts/nni_manager/training_service/reusable/dlc
amlClient.ts
dlcClient.ts
80:115 (24%)
92:127 (22%)
view
27 x 2 nni/algorithms/nas/pytorch/classic_nas
nni/algorithms/nas/tensorflow/classic_nas
mutator.py
mutator.py
16:80 (26%)
18:79 (27%)
view
27 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
agent.py
agent.py
197:230 (18%)
188:221 (18%)
view
26 x 2 ts/nni_manager/training_service/kubernetes
ts/nni_manager/training_...environments/kubernetes
kubernetesTrainingService.ts
kubernetesEnvironmentService.ts
361:392 (10%)
115:146 (14%)
view
23 x 2 ts/webui/src/components/modals
ts/webui/src/components/overview/params
Killjob.tsx
basicInfoStyles.ts
22:46 (19%)
13:37 (54%)
view
22 x 2 ts/nni_manager/training_service/reusable/aml
ts/nni_manager/training_service/reusable/dlc
amlClient.ts
dlcClient.ts
122:152 (18%)
135:165 (17%)
view
22 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
275:305 (8%)
258:288 (9%)
view
21 x 2 nni/retiarii/oneshot/pytorch
nni/retiarii/oneshot/pytorch
darts.py
proxyless.py
143:165 (12%)
263:285 (8%)
view
21 x 2 ts/nni_manager/training_...ice/kubernetes/kubeflow
ts/nni_manager/training_...environments/kubernetes
kubeflowTrainingService.ts
kubeflowEnvironmentService.ts
435:460 (7%)
243:268 (12%)
view
21 x 2 ts/nni_manager/training_service/pai
ts/nni_manager/training_...e/reusable/environments
paiTrainingService.ts
openPaiEnvironmentService.ts
312:334 (7%)
265:287 (9%)
view
19 x 2 nni/algorithms/compression/pytorch/pruning
nni/algorithms/compression/pytorch/pruning
auto_compress_pruner.py
simulated_annealing_pruner.py
118:147 (18%)
103:132 (9%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 64 unit duplicates...
Size#FoldersFilesLinesCode
47 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
memory.py
memory.py
0:0 
0:0 
view
30 x 2 ts/nni_manager/training_service/kubernetes
ts/nni_manager/training_...environments/kubernetes
kubernetesTrainingService.ts
kubernetesEnvironmentService.ts
361:393 
115:147 
view
25 x 2 nni/algorithms/nas/pytorch/classic_nas
nni/algorithms/nas/tensorflow/classic_nas
mutator.py
mutator.py
0:0 
0:0 
view
19 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
memory.py
memory.py
0:0 
0:0 
view
21 x 2 nni/algorithms/nas/pytorch/classic_nas
nni/algorithms/nas/tensorflow/classic_nas
mutator.py
mutator.py
0:0 
0:0 
view
31 x 2 nni/algorithms/nas/pytorch/classic_nas
nni/algorithms/nas/tensorflow/classic_nas
mutator.py
mutator.py
0:0 
0:0 
view
23 x 3 nni/algorithms/compression/pytorch/pruning
nni/algorithms/compression/pytorch/pruning
nni/algorithms/compression/pytorch/pruning
auto_compress_pruner.py
net_adapt_pruner.py
simulated_annealing_pruner.py
0:0 
0:0 
0:0 
view
18 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
0:0 
0:0 
view
15 x 2 ts/nni_manager/training_service/reusable/aml
ts/nni_manager/training_service/reusable/dlc
amlClient.ts
dlcClient.ts
96:111 
108:123 
view
27 x 2 nni/algorithms/nas/pytorch/classic_nas
nni/algorithms/nas/tensorflow/classic_nas
mutator.py
mutator.py
0:0 
0:0 
view
15 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
0:0 
0:0 
view
14 x 2 ts/nni_manager/training_service/reusable/aml
ts/nni_manager/training_service/reusable/dlc
amlClient.ts
dlcClient.ts
80:94 
92:106 
view
14 x 2 ts/nni_manager/training_service/reusable/aml
ts/nni_manager/training_service/reusable/dlc
amlClient.ts
dlcClient.ts
120:134 
133:147 
view
13 x 2 nni/retiarii/oneshot/pytorch
nni/retiarii/oneshot/pytorch
darts.py
proxyless.py
0:0 
0:0 
view
17 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
0:0 
0:0 
view
17 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
0:0 
0:0 
view
16 x 2 nni/algorithms/compression/pytorch/pruning/amc/lib
nni/algorithms/compressi...ch/pruning/tools/rl_env
memory.py
memory.py
0:0 
0:0 
view
24 x 2 nni/algorithms/compression/v2/pytorch/utils
nni/compression/pytorch/utils
pruning.py
utils.py
0:0 
0:0 
view
14 x 2 nni/nas/pytorch
nni/retiarii/oneshot/pytorch
utils.py
utils.py
0:0 
0:0 
view
15 x 2 nni/tools/annotation
nni/tools/annotation
code_generator.py
specific_code_generator.py
0:0 
0:0 
view