aws-samples / sagemaker-rl-energy-storage-system
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
  • 12% duplication:
    • 5,183 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 649 duplicated lines
  • 46 duplicates
system12% (649 lines)
Duplication per Extension
py12% (617 lines)
yaml19% (32 lines)
Duplication per Component (primary)
src/sagemaker_rl/orchestrator/workflow18% (429 lines)
src/sagemaker_rl/orchestrator/utils33% (75 lines)
src/sagemaker_rl/orchestrator10% (59 lines)
src/energy_storage_system14% (48 lines)
src/sagemaker_rl2% (24 lines)
src/sagemaker_rl/orchestrator/clients4% (14 lines)
src/smnb_utils0% (0 lines)
src/energy_storage_system/utils0% (0 lines)
src/source_dir0% (0 lines)
src/sagemaker_rl/orchestrator/exceptions0% (0 lines)
ROOT0% (0 lines)
notebooks0% (0 lines)

Duplication Between Components (50+ lines)

G src/sagemaker_rl/orchestrator src/sagemaker_rl/orchestrator src/sagemaker_rl/orchestrator/workflow src/sagemaker_rl/orchestrator/workflow src/sagemaker_rl/orchestrator--src/sagemaker_rl/orchestrator/workflow 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 46 duplicates...
Size#FoldersFilesLinesCode
32 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
experiment_manager.py
experiment_manager.py
1591:1626 (2%)
1707:1742 (2%)
view
27 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
experiment_manager.py
experiment_manager.py
1394:1422 (1%)
1489:1517 (1%)
view
17 x 2 src/sagemaker_rl/orchestrator
src/sagemaker_rl/orchestrator/workflow/manager
resource_manager.py
join_manager.py
558:578 (4%)
175:195 (4%)
view
16 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
experiment_manager.py
experiment_manager.py
1561:1580 (1%)
1683:1700 (1%)
view
12 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
join_manager.py
join_manager.py
204:240 (2%)
248:264 (2%)
view
12 x 2 src/sagemaker_rl
src/sagemaker_rl
stable_baselines_launcher.py
stable_baselines_launcher.py
72:83 (12%)
89:100 (12%)
view
11 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
experiment_manager.py
experiment_manager.py
1052:1063 (<1%)
1122:1132 (<1%)
view
11 x 2 src/energy_storage_system
src/energy_storage_system
envs.py
envs.py
193:203 (6%)
259:269 (6%)
view
10 x 2 src/sagemaker_rl/orchestrator/workflow/datatypes
src/sagemaker_rl/orchestrator/workflow/manager
join_job_record.py
join_manager.py
12:21 (13%)
29:38 (2%)
view
10 x 2 src/sagemaker_rl/orchestrator
src/sagemaker_rl/orchestrator/workflow/manager
resource_manager.py
join_manager.py
543:554 (2%)
162:173 (2%)
view
9 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
join_manager.py
join_manager.py
530:538 (2%)
635:643 (2%)
view
8 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
join_manager.py
join_manager.py
457:464 (1%)
487:494 (1%)
view
7 x 2 src/sagemaker_rl/orchestrator/utils
src/sagemaker_rl/orchestrator/utils
cloudwatch_logger.py
cloudwatch_logger.py
155:161 (3%)
178:184 (3%)
view
7 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
experiment_manager.py
experiment_manager.py
1536:1542 (<1%)
1658:1664 (<1%)
view
7 x 2 src/sagemaker_rl/orchestrator/utils
src/sagemaker_rl/orchestrator/utils
cloudwatch_logger.py
cloudwatch_logger.py
27:33 (3%)
75:81 (3%)
view
7 x 2 src/energy_storage_system
src/energy_storage_system
envs.py
envs.py
139:146 (3%)
170:177 (3%)
view
7 x 2 src/sagemaker_rl/orchestrator/workflow/manager
src/sagemaker_rl/orchestrator/workflow/manager
experiment_manager.py
experiment_manager.py
1041:1047 (<1%)
1111:1117 (<1%)
view
7 x 2 src/sagemaker_rl/orchestrator/clients/ddb
src/sagemaker_rl/orchestrator/clients/ddb
join_db_client.py
model_db_client.py
43:49 (7%)
81:87 (5%)
view
7 x 2 src/sagemaker_rl/orchestrator
src/sagemaker_rl/orchestrator
cloudformation.yaml
cloudformation.yaml
73:79 (4%)
94:100 (4%)
view
7 x 2 src/sagemaker_rl/orchestrator/utils
src/sagemaker_rl/orchestrator/utils
cloudwatch_logger.py
cloudwatch_logger.py
127:133 (3%)
192:198 (3%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
7 x 2 src/sagemaker_rl/orchestrator/clients/ddb
src/sagemaker_rl/orchestrator/clients/ddb
model_db_client.py
join_db_client.py
0:0 
0:0 
view