facebookresearch / hydra
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
  • 9% duplication:
    • 11,142 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,049 duplicated lines
  • 229 duplicates
system9% (1,049 lines)
Duplication per Extension
py7% (679 lines)
toml78% (268 lines)
yaml17% (72 lines)
html100% (30 lines)
Duplication per Component (primary)
plugins/hydra_ray_launcher16% (130 lines)
hydra/_internal3% (126 lines)
plugins/hydra_optuna_sweeper21% (106 lines)
plugins/hydra_rq_launcher39% (97 lines)
plugins/hydra_joblib_launcher39% (79 lines)
plugins/hydra_ax_sweeper16% (71 lines)
plugins/hydra_nevergrad_sweeper19% (64 lines)
hydra/core3% (60 lines)
hydra22% (55 lines)
plugins/hydra_submitit_launcher21% (49 lines)
plugins/hydra_colorlog35% (41 lines)
hydra/experimental41% (41 lines)
ROOT7% (34 lines)
website/versioned_docs100% (30 lines)
hydra/plugins5% (20 lines)
hydra/conf8% (16 lines)
tools/release7% (16 lines)
tools/configen3% (14 lines)
tools/ci0% (0 lines)
website0% (0 lines)
website/src0% (0 lines)
build_helpers0% (0 lines)
hydra/grammar0% (0 lines)
hydra/extra0% (0 lines)

Duplication Between Components (50+ lines)

G plugins/hydra_ray_launcher plugins/hydra_ray_launcher plugins/hydra_rq_launcher plugins/hydra_rq_launcher plugins/hydra_ray_launcher--plugins/hydra_rq_launcher 150 plugins/hydra_submitit_launcher plugins/hydra_submitit_launcher plugins/hydra_ray_launcher--plugins/hydra_submitit_launcher 106 ROOT ROOT plugins/hydra_ray_launcher--ROOT 54 plugins/hydra_rq_launcher--plugins/hydra_submitit_launcher 76 plugins/hydra_rq_launcher--ROOT 54 plugins/hydra_joblib_launcher plugins/hydra_joblib_launcher plugins/hydra_joblib_launcher--plugins/hydra_ray_launcher 116 plugins/hydra_joblib_launcher--plugins/hydra_rq_launcher 150 plugins/hydra_optuna_sweeper plugins/hydra_optuna_sweeper plugins/hydra_joblib_launcher--plugins/hydra_optuna_sweeper 93 plugins/hydra_nevergrad_sweeper plugins/hydra_nevergrad_sweeper plugins/hydra_joblib_launcher--plugins/hydra_nevergrad_sweeper 93 plugins/hydra_joblib_launcher--plugins/hydra_submitit_launcher 90 plugins/hydra_joblib_launcher--ROOT 54 plugins/hydra_ax_sweeper plugins/hydra_ax_sweeper plugins/hydra_ax_sweeper--plugins/hydra_ray_launcher 112 plugins/hydra_ax_sweeper--plugins/hydra_rq_launcher 95 plugins/hydra_ax_sweeper--plugins/hydra_joblib_launcher 101 plugins/hydra_ax_sweeper--plugins/hydra_optuna_sweeper 132 plugins/hydra_ax_sweeper--plugins/hydra_nevergrad_sweeper 110 plugins/hydra_ax_sweeper--plugins/hydra_submitit_launcher 97 plugins/hydra_colorlog plugins/hydra_colorlog plugins/hydra_ax_sweeper--plugins/hydra_colorlog 72 plugins/hydra_ax_sweeper--ROOT 54 plugins/hydra_optuna_sweeper--plugins/hydra_ray_launcher 100 plugins/hydra_optuna_sweeper--plugins/hydra_rq_launcher 101 plugins/hydra_optuna_sweeper--plugins/hydra_submitit_launcher 81 plugins/hydra_optuna_sweeper--ROOT 66 plugins/hydra_nevergrad_sweeper--plugins/hydra_ray_launcher 100 plugins/hydra_nevergrad_sweeper--plugins/hydra_rq_launcher 101 plugins/hydra_nevergrad_sweeper--plugins/hydra_optuna_sweeper 116 plugins/hydra_nevergrad_sweeper--plugins/hydra_submitit_launcher 81 plugins/hydra_nevergrad_sweeper--ROOT 54 plugins/hydra_submitit_launcher--ROOT 54 plugins/hydra_colorlog--plugins/hydra_ray_launcher 72 plugins/hydra_colorlog--plugins/hydra_rq_launcher 80 plugins/hydra_colorlog--plugins/hydra_joblib_launcher 72 plugins/hydra_colorlog--plugins/hydra_optuna_sweeper 80 plugins/hydra_colorlog--plugins/hydra_nevergrad_sweeper 82 plugins/hydra_colorlog--plugins/hydra_submitit_launcher 60 plugins/hydra_colorlog--ROOT 54 hydra/_internal hydra/_internal hydra/core hydra/core hydra/_internal--hydra/core 52

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 229 duplicates...
Size#FoldersFilesLinesCode
30 x 2 plugins/hydra_rq_launcher
plugins/hydra_submitit_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_optuna_sweeper
plugins/hydra_ray_launcher
toml
pyproject.toml
pyproject.toml
8:43 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_optuna_sweeper
plugins/hydra_submitit_launcher
toml
pyproject.toml
pyproject.toml
8:43 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_joblib_launcher
plugins/hydra_submitit_launcher
toml
pyproject.toml
pyproject.toml
8:43 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_optuna_sweeper
plugins/hydra_rq_launcher
toml
pyproject.toml
pyproject.toml
8:43 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_nevergrad_sweeper
plugins/hydra_submitit_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_colorlog
plugins/hydra_joblib_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
8:43 (85%)
view
30 x 2 plugins/hydra_joblib_launcher
plugins/hydra_nevergrad_sweeper
toml
pyproject.toml
pyproject.toml
8:43 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_colorlog
plugins/hydra_nevergrad_sweeper
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_joblib_launcher
plugins/hydra_optuna_sweeper
toml
pyproject.toml
pyproject.toml
8:43 (85%)
8:43 (85%)
view
30 x 2 plugins/hydra_ray_launcher
plugins/hydra_rq_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_colorlog
plugins/hydra_ray_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_nevergrad_sweeper
plugins/hydra_optuna_sweeper
toml
pyproject.toml
pyproject.toml
7:42 (85%)
8:43 (85%)
view
30 x 2 plugins/hydra_ax_sweeper
plugins/hydra_joblib_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
8:43 (85%)
view
30 x 2 plugins/hydra_ax_sweeper
plugins/hydra_ray_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_ray_launcher
plugins/hydra_submitit_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_ax_sweeper
plugins/hydra_nevergrad_sweeper
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_ax_sweeper
plugins/hydra_rq_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
30 x 2 plugins/hydra_colorlog
plugins/hydra_optuna_sweeper
toml
pyproject.toml
pyproject.toml
7:42 (85%)
8:43 (85%)
view
30 x 2 plugins/hydra_colorlog
plugins/hydra_submitit_launcher
toml
pyproject.toml
pyproject.toml
7:42 (85%)
7:42 (85%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 hydra/_internal
hydra/_internal
defaults_list.py
defaults_list.py
0:0 
0:0 
view