Ludwig
Duplication

Intro
  • For duplication, we look at places in code where there are six 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
  • 31% duplication:
    • 22,765 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,238 duplicated lines
  • 369 duplicates
system31% (7,238 lines)
Duplication per Extension
py31% (7,238 lines)
Duplication per Component (primary)
ludwig36% (1,912 lines)
ludwig/features44% (1,614 lines)
ludwig/encoders58% (1,553 lines)
ludwig/modules36% (794 lines)
ludwig/utils9% (403 lines)
ludwig/hyperopt38% (346 lines)
ludwig/data15% (207 lines)
ludwig/decoders27% (183 lines)
ludwig/models7% (109 lines)
ludwig/combiners24% (57 lines)
ludwig/contribs22% (44 lines)
examples/mnist10% (8 lines)
examples/titanic23% (8 lines)
ROOT0% (0 lines)
examples/kfold_cv0% (0 lines)

Duplication Between Components (50+ lines)

G ludwig ludwig ludwig/hyperopt ludwig/hyperopt ludwig--ludwig/hyperopt 303 ludwig/data ludwig/data ludwig--ludwig/data 94 ludwig/utils ludwig/utils ludwig--ludwig/utils 77 ludwig/encoders ludwig/encoders ludwig/modules ludwig/modules ludwig/encoders--ludwig/modules 196 ludwig/combiners ludwig/combiners ludwig/encoders--ludwig/combiners 246 ludwig/decoders ludwig/decoders ludwig/encoders--ludwig/decoders 82

Download: SVG DOT (open online Graphviz editor)

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
Size#FoldersFilesLinesCode
46 x 2 ludwig/features
ludwig/features
category_feature.py
sequence_feature.py
294:342 (11%)
291:339 (11%)
view
42 x 2 ludwig/encoders
ludwig/encoders
sequence_encoders.py
sequence_encoders.py
1428:1492 (4%)
1735:1799 (4%)
view
41 x 2 ludwig/modules
ludwig/modules
convolutional_modules.py
convolutional_modules.py
166:211 (4%)
300:345 (4%)
view
38 x 2 ludwig
ludwig
experiment.py
train.py
720:762 (6%)
683:725 (7%)
view
37 x 2 ludwig
ludwig
experiment.py
experiment.py
51:87 (6%)
174:210 (6%)
view
37 x 2 ludwig
ludwig
predict.py
experiment.py
366:403 (12%)
829:866 (6%)
view
36 x 3 ludwig/hyperopt
ludwig/hyperopt
ludwig/hyperopt
execution.py
execution.py
execution.py
87:124 (5%)
249:286 (5%)
515:552 (5%)
view
36 x 2 ludwig
ludwig
experiment.py
train.py
643:680 (5%)
633:670 (6%)
view
34 x 2 ludwig
ludwig
experiment.py
experiment.py
95:128 (5%)
331:364 (5%)
view
31 x 2 ludwig/features
ludwig/features
numerical_feature.py
vector_feature.py
284:317 (11%)
277:310 (13%)
view
31 x 2 ludwig/features
ludwig/features
category_feature.py
sequence_feature.py
344:378 (7%)
341:374 (7%)
view
31 x 2 ludwig
ludwig
collect.py
api.py
273:304 (11%)
1199:1230 (5%)
view
30 x 2 ludwig
ludwig
api.py
experiment.py
530:559 (5%)
97:126 (4%)
view
30 x 2 ludwig
ludwig
collect.py
predict.py
252:289 (11%)
343:381 (10%)
view
29 x 3 ludwig/encoders
ludwig/encoders
ludwig/encoders
sequence_encoders.py
sequence_encoders.py
sequence_encoders.py
414:449 (3%)
761:796 (3%)
1108:1143 (3%)
view
29 x 2 ludwig
ludwig
visualize.py
visualize.py
1585:1640 (1%)
1671:1728 (1%)
view
29 x 2 ludwig/features
ludwig/features
numerical_feature.py
vector_feature.py
40:82 (10%)
41:85 (12%)
view
28 x 3 ludwig/encoders
ludwig/encoders
ludwig/encoders
sequence_encoders.py
sequence_encoders.py
sequence_encoders.py
471:512 (3%)
822:869 (3%)
1164:1211 (3%)
view
28 x 2 ludwig/encoders
ludwig/encoders
h3_encoders.py
date_encoders.py
164:204 (8%)
206:247 (9%)
view
27 x 2 ludwig/data
ludwig/data
preprocessing.py
preprocessing.py
115:145 (3%)
166:197 (3%)
view
Most Frequent Duplicates
The list of 20 most frequently found duplicates.
Size#FoldersFilesLinesCode
8 x 17 ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
...
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
text_encoders.py
...
45:53 (1%)
100:108 (1%)
150:158 (1%)
199:207 (1%)
247:255 (1%)
296:304 (1%)
345:353 (1%)
398:406 (1%)
450:458 (1%)
499:507 (1%)
...
view
6 x 14 ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
ludwig/utils
...
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
visualization_utils.py
...
108:113 (<1%)
349:354 (<1%)
439:444 (<1%)
508:513 (<1%)
577:582 (<1%)
632:637 (<1%)
721:726 (<1%)
771:776 (<1%)
823:828 (<1%)
878:883 (<1%)
...
view
6 x 13 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
...
binary_feature.py
audio_feature.py
bag_feature.py
category_feature.py
set_feature.py
vector_feature.py
text_feature.py
numerical_feature.py
timeseries_feature.py
image_feature.py
...
56:61 (2%)
221:226 (1%)
79:84 (6%)
84:89 (1%)
87:92 (2%)
101:106 (2%)
202:207 (1%)
116:121 (2%)
113:118 (4%)
224:229 (1%)
...
view
7 x 13 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
...
binary_feature.py
audio_feature.py
bag_feature.py
category_feature.py
vector_feature.py
text_feature.py
numerical_feature.py
timeseries_feature.py
date_feature.py
image_feature.py
...
102:108 (2%)
381:387 (2%)
119:125 (8%)
129:135 (1%)
173:179 (2%)
257:263 (1%)
167:173 (2%)
155:161 (4%)
140:146 (6%)
409:415 (2%)
...
view
6 x 13 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
...
sequence_feature.py
base_feature.py
set_feature.py
binary_feature.py
text_feature.py
vector_feature.py
timeseries_feature.py
image_feature.py
numerical_feature.py
category_feature.py
...
158:163 (1%)
86:91 (1%)
130:135 (2%)
103:108 (2%)
258:263 (1%)
174:179 (2%)
156:161 (4%)
410:415 (1%)
168:173 (2%)
130:135 (1%)
...
view
6 x 12 ludwig/combiners
ludwig/decoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/modules
ludwig/encoders
ludwig/encoders
ludwig/encoders
...
combiners.py
sequence_decoders.py
date_encoders.py
generic_encoders.py
h3_encoders.py
set_encoders.py
fully_connected_modules.py
image_encoders.py
bag_encoders.py
sequence_encoders.py
...
42:47 (2%)
57:62 (1%)
38:43 (2%)
50:55 (12%)
40:45 (1%)
40:45 (9%)
33:38 (5%)
156:161 (3%)
41:46 (9%)
240:245 (<1%)
...
view
10 x 10 ludwig
ludwig
ludwig
ludwig
ludwig
ludwig
ludwig
ludwig
ludwig
ludwig
visualize.py
visualize.py
visualize.py
visualize.py
visualize.py
visualize.py
visualize.py
visualize.py
visualize.py
visualize.py
193:211 (<1%)
249:267 (<1%)
274:292 (<1%)
366:384 (<1%)
391:410 (<1%)
417:436 (<1%)
543:561 (<1%)
568:586 (<1%)
605:623 (<1%)
628:646 (<1%)
view
9 x 10 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
category_feature.py
set_feature.py
vector_feature.py
numerical_feature.py
bag_feature.py
binary_feature.py
date_feature.py
h3_feature.py
sequence_feature.py
image_feature.py
101:110 (2%)
105:114 (4%)
148:157 (3%)
141:150 (3%)
97:106 (10%)
75:84 (3%)
116:125 (8%)
79:88 (11%)
127:137 (2%)
348:357 (2%)
view
9 x 10 ludwig/encoders
ludwig/encoders
ludwig/combiners
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/modules
ludwig/modules
sequence_encoders.py
bag_encoders.py
combiners.py
date_encoders.py
generic_encoders.py
h3_encoders.py
set_encoders.py
image_encoders.py
convolutional_modules.py
fully_connected_modules.py
240:250 (<1%)
41:51 (14%)
42:52 (3%)
38:48 (3%)
50:60 (18%)
40:50 (2%)
40:50 (14%)
156:166 (5%)
47:57 (<1%)
33:43 (7%)
view
8 x 8 ludwig
ludwig
ludwig
ludwig
ludwig/utils
ludwig
ludwig
ludwig
serve.py
experiment.py
collect.py
predict.py
neuropod_utils.py
train.py
visualize.py
api.py
133:141 (7%)
857:864 (1%)
295:302 (2%)
394:401 (2%)
309:317 (2%)
803:810 (1%)
3368:3375 (<1%)
1221:1228 (1%)
view
6 x 8 ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/combiners
ludwig/encoders
ludwig/encoders
h3_encoders.py
date_encoders.py
set_encoders.py
image_encoders.py
generic_encoders.py
combiners.py
bag_encoders.py
sequence_encoders.py
175:180 (1%)
107:112 (2%)
77:82 (9%)
203:208 (3%)
72:77 (12%)
74:79 (2%)
77:82 (9%)
456:461 (<1%)
view
12 x 8 ludwig/combiners
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
combiners.py
generic_encoders.py
set_encoders.py
image_encoders.py
bag_encoders.py
h3_encoders.py
date_encoders.py
sequence_encoders.py
73:86 (5%)
71:84 (25%)
76:89 (19%)
202:215 (7%)
76:89 (19%)
174:187 (3%)
216:229 (4%)
478:491 (1%)
view
6 x 8 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
sequence_feature.py
base_feature.py
set_feature.py
binary_feature.py
text_feature.py
vector_feature.py
numerical_feature.py
category_feature.py
368:373 (1%)
293:298 (1%)
229:234 (2%)
213:218 (2%)
394:399 (1%)
278:283 (2%)
285:290 (2%)
372:377 (1%)
view
10 x 8 ludwig/encoders
ludwig/modules
ludwig/encoders
ludwig/encoders
ludwig/combiners
ludwig/encoders
ludwig/modules
ludwig/encoders
image_encoders.py
convolutional_modules.py
h3_encoders.py
sequence_encoders.py
combiners.py
date_encoders.py
fully_connected_modules.py
generic_encoders.py
156:167 (6%)
47:58 (1%)
40:51 (3%)
240:251 (1%)
42:53 (4%)
38:49 (3%)
33:44 (8%)
50:61 (20%)
view
10 x 8 ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/combiners
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
h3_encoders.py
sequence_encoders.py
bag_encoders.py
combiners.py
date_encoders.py
generic_encoders.py
set_encoders.py
image_encoders.py
175:186 (3%)
456:467 (1%)
77:88 (16%)
74:85 (4%)
217:228 (3%)
72:83 (20%)
77:88 (16%)
203:214 (6%)
view
7 x 8 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
numerical_feature.py
base_feature.py
binary_feature.py
set_feature.py
sequence_feature.py
text_feature.py
vector_feature.py
category_feature.py
294:300 (2%)
303:309 (2%)
273:279 (2%)
238:244 (3%)
389:395 (1%)
416:422 (1%)
287:293 (2%)
390:396 (1%)
view
10 x 7 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
vector_feature.py
text_feature.py
numerical_feature.py
category_feature.py
binary_feature.py
set_feature.py
sequence_feature.py
286:295 (4%)
415:425 (2%)
293:302 (3%)
389:398 (2%)
272:281 (3%)
237:246 (4%)
388:397 (2%)
view
7 x 7 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
category_feature.py
set_feature.py
vector_feature.py
text_feature.py
numerical_feature.py
sequence_feature.py
binary_feature.py
371:377 (1%)
228:234 (3%)
277:283 (2%)
393:399 (1%)
284:290 (2%)
367:373 (1%)
212:218 (2%)
view
16 x 7 ludwig/encoders
ludwig/encoders
ludwig/combiners
ludwig/encoders
ludwig/encoders
ludwig/encoders
ludwig/encoders
h3_encoders.py
sequence_encoders.py
combiners.py
date_encoders.py
set_encoders.py
image_encoders.py
bag_encoders.py
170:187 (5%)
474:491 (1%)
69:86 (6%)
212:229 (5%)
72:89 (26%)
198:215 (10%)
72:89 (26%)
view
6 x 7 ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
ludwig/features
sequence_feature.py
base_feature.py
set_feature.py
text_feature.py
vector_feature.py
numerical_feature.py
category_feature.py
266:271 (1%)
283:288 (1%)
219:224 (2%)
340:345 (1%)
269:274 (2%)
276:281 (2%)
245:250 (1%)
view