awslabs / autogluon
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
  • 8% duplication:
    • 26,195 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,171 duplicated lines
  • 215 duplicates
system8% (2,171 lines)
Duplication per Extension
py8% (2,171 lines)
Duplication per Component (primary)
tabular/src9% (1,014 lines)
vision/src34% (575 lines)
text/src8% (229 lines)
core/src1% (144 lines)
common/src3% (46 lines)
features/src2% (38 lines)
core34% (16 lines)
autogluon69% (16 lines)
vision64% (16 lines)
tabular28% (16 lines)
text66% (16 lines)
features69% (16 lines)
forecasting53% (15 lines)
common46% (14 lines)
forecasting/src0% (0 lines)
autogluon/src0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G core/src core/src tabular/src tabular/src core/src--tabular/src 58

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 215 duplicates...
Size#FoldersFilesLinesCode
36 x 2 vision/src/autogluon/vision/_gluoncv
vision/src/autogluon/vision/_gluoncv
image_classification.py
object_detection.py
231:273 (11%)
174:215 (12%)
view
26 x 2 vision/src/autogluon/vision/_gluoncv
vision/src/autogluon/vision/_gluoncv
image_classification.py
object_detection.py
302:355 (8%)
268:322 (9%)
view
25 x 2 vision/src/autogluon/vision/detector
vision/src/autogluon/vision/predictor
detector.py
predictor.py
351:380 (12%)
477:506 (6%)
view
21 x 2 core/src/autogluon/core/utils
vision/src/autogluon/vision/configs
decorators.py
presets_configs.py
38:58 (61%)
175:195 (11%)
view
18 x 2 text/src/autogluon/text/text_prediction/mx
text/src/autogluon/text/text_prediction/mx
models.py
models.py
1288:1305 (1%)
1545:1562 (1%)
view
17 x 2 tabular/src/autogluon/tabular/models/rf
tabular/src/autogluon/tabular/models/rf
rf_quantile.py
rf_quantile.py
573:590 (7%)
714:731 (7%)
view
15 x 2 tabular/src/autogluon/tabular/models/rf
tabular/src/autogluon/tabular/models/rf
rf_quantile.py
rf_quantile.py
552:566 (6%)
695:709 (6%)
view
15 x 2 vision/src/autogluon/vision/_gluoncv
vision/src/autogluon/vision/_gluoncv
image_classification.py
object_detection.py
187:203 (4%)
138:154 (5%)
view
15 x 2 vision/src/autogluon/vision/_gluoncv
vision/src/autogluon/vision/_gluoncv
image_classification.py
object_detection.py
166:182 (4%)
119:135 (5%)
view
14 x 2 vision/src/autogluon/vision/_gluoncv
vision/src/autogluon/vision/_gluoncv
image_classification.py
object_detection.py
89:105 (4%)
72:88 (5%)
view
14 x 2 tabular/src/autogluon/ta...models/tabular_nn/mxnet
tabular/src/autogluon/ta...models/tabular_nn/torch
tabular_nn_dataset.py
tabular_torch_dataset.py
171:190 (7%)
156:175 (10%)
view
14 x 2 text/src/autogluon/text/text_prediction/mx
text/src/autogluon/text/text_prediction/mx
modules.py
modules.py
88:102 (2%)
152:166 (2%)
view
13 x 2 tabular/src/autogluon/tabular/models/knn
tabular/src/autogluon/tabular/models/knn
knn_utils.py
knn_utils.py
104:118 (8%)
194:208 (8%)
view
12 x 2 common/src/autogluon/common/loaders
common/src/autogluon/common/loaders
load_s3.py
load_s3.py
33:45 (20%)
53:65 (20%)
view
12 x 2 tabular/src/autogluon/tabular/models/catboost
tabular/src/autogluon/tabular/models/lgb
catboost_model.py
lgb_model.py
61:75 (7%)
65:77 (4%)
view
12 x 2 tabular/src/autogluon/ta...models/image_prediction
tabular/src/autogluon/tabular/models/vowpalwabbit
image_predictor.py
vowpalwabbit_model.py
44:56 (7%)
237:249 (8%)
view
12 x 2 vision/src/autogluon/vision/detector
vision/src/autogluon/vision/predictor
detector.py
predictor.py
262:273 (5%)
356:367 (2%)
view
12 x 2 tabular/src/autogluon/tabular/models/knn
tabular/src/autogluon/tabular/models/knn
knn_utils.py
knn_utils.py
62:75 (8%)
139:152 (8%)
view
12 x 2 vision/src/autogluon/vision/_gluoncv
vision/src/autogluon/vision/_gluoncv
image_classification.py
object_detection.py
152:164 (3%)
105:117 (4%)
view
11 x 2 tabular/src/autogluon/ta...els/lgb/hyperparameters
tabular/src/autogluon/ta...els/lgb/hyperparameters
searchspaces.py
searchspaces.py
23:35 (20%)
57:67 (20%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
16 x 2 tabular/src/autogluon/ta...models/tabular_nn/mxnet
tabular/src/autogluon/ta...models/tabular_nn/torch
tabular_nn_dataset.py
tabular_torch_dataset.py
0:0 
0:0 
view
8 x 3 tabular/src/autogluon/ta...xgboost/hyperparameters
tabular/src/autogluon/ta...atboost/hyperparameters
tabular/src/autogluon/ta...els/lgb/hyperparameters
searchspaces.py
searchspaces.py
searchspaces.py
0:0 
0:0 
0:0 
view
7 x 2 tabular/src/autogluon/ta...models/image_prediction
tabular/src/autogluon/tabular/models/vowpalwabbit
image_predictor.py
vowpalwabbit_model.py
0:0 
0:0 
view
7 x 3 tabular/src/autogluon/ta...models/tabular_nn/mxnet
tabular/src/autogluon/ta...models/tabular_nn/torch
tabular/src/autogluon/ta.../models/tab_transformer
tabular_nn_mxnet.py
tabular_nn_torch.py
tab_transformer_model.py
0:0 
0:0 
0:0 
view
7 x 2 tabular/src/autogluon/tabular/models/knn
tabular/src/autogluon/tabular/models/knn
knn_utils.py
knn_utils.py
0:0 
0:0 
view
8 x 2 tabular/src/autogluon/tabular/models/knn
tabular/src/autogluon/tabular/models/rf
knn_model.py
rf_model.py
0:0 
0:0 
view
7 x 2 tabular/src/autogluon/ta...els/lgb/hyperparameters
tabular/src/autogluon/ta...els/lgb/hyperparameters
parameters.py
parameters.py
0:0 
0:0 
view
6 x 6 tabular/src/autogluon/tabular/models/xgboost
tabular/src/autogluon/tabular/models/catboost
tabular/src/autogluon/tabular/models/lr
tabular/src/autogluon/tabular/models/rf
tabular/src/autogluon/tabular/models/fastainn
tabular/src/autogluon/tabular/models/lgb
xgboost_model.py
catboost_model.py
lr_model.py
rf_model.py
tabular_nn_fastai.py
lgb_model.py
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
6 x 2 tabular/src/autogluon/ta...atboost/hyperparameters
tabular/src/autogluon/ta...atboost/hyperparameters
searchspaces.py
searchspaces.py
0:0 
0:0 
view