pytorch / serve
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
  • 11% duplication:
    • 16,309 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,841 duplicated lines
  • 137 duplicates
system11% (1,841 lines)
Duplication per Extension
yaml52% (927 lines)
java7% (622 lines)
py3% (198 lines)
yml84% (94 lines)
Duplication per Component (primary)
cloudformation69% (757 lines)
frontend7% (622 lines)
kubernetes16% (182 lines)
ci30% (94 lines)
ts3% (57 lines)
binaries13% (41 lines)
model-archiver7% (30 lines)
workflow-archiver12% (30 lines)
ts_scripts2% (28 lines)
experimental0% (0 lines)
plugins0% (0 lines)
serving-sdk0% (0 lines)
ROOT0% (0 lines)
benchmarks0% (0 lines)

Duplication Between Components (50+ lines)

G model-archiver model-archiver workflow-archiver workflow-archiver model-archiver--workflow-archiver 60

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 137 duplicates...
Size#FoldersFilesLinesCode
82 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
178:259 (12%)
147:228 (18%)
view
81 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
477:558 (12%)
275:356 (18%)
view
35 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
39:73 (5%)
30:64 (7%)
view
34 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
78:111 (5%)
67:100 (7%)
view
34 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
135:168 (5%)
109:142 (7%)
view
23 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
269:291 (3%)
233:255 (5%)
view
22 x 2 cloudformation
cloudformation
ec2-asg.yaml
ec2.yaml
561:582 (3%)
359:380 (4%)
view
21 x 2 frontend/server/src/main...rch/serve/http/api/rest
frontend/server/src/main...serve/workflow/api/http
InferenceRequestHandler.java
WorkflowInferenceRequestHandler.java
275:300 (10%)
92:117 (33%)
view
20 x 2 frontend/server/src/main/java/org/pytorch/serve
frontend/server/src/main/java/org/pytorch/serve
ModelServer.java
ModelServer.java
195:214 (5%)
254:273 (5%)
view
18 x 2 frontend/server/src/main...a/org/pytorch/serve/job
frontend/server/src/main...a/org/pytorch/serve/job
GRPCJob.java
RestJob.java
49:68 (36%)
81:100 (25%)
view
17 x 2 kubernetes/EKS/templates
kubernetes/kserve/reference_yaml
efs_pv_claim.yaml
pv_pod.yaml
16:32 (54%)
1:17 (80%)
view
17 x 2 frontend/server/src/main.../pytorch/serve/ensemble
frontend/server/src/main...serve/workflow/messages
WorkFlow.java
DescribeWorkflowResponse.java
183:215 (11%)
31:63 (45%)
view
17 x 2 frontend/archive/src/mai...rch/serve/archive/model
frontend/server/src/main.../pytorch/serve/ensemble
Manifest.java
WorkflowManifest.java
127:151 (20%)
118:142 (21%)
view
17 x 2 kubernetes/kserve/kf_request_json/v2
ts/torch_handler/request_envelope
utils.py
kservev2.py
4:23 (62%)
12:31 (23%)
view
16 x 2 frontend/server/src/main.../pytorch/serve/ensemble
frontend/server/src/main...serve/workflow/messages
WorkflowModel.java
DescribeWorkflowResponse.java
52:81 (25%)
31:60 (43%)
view
16 x 2 frontend/server/src/main...rch/serve/http/messages
frontend/server/src/main...serve/workflow/messages
DescribeModelResponse.java
DescribeWorkflowResponse.java
76:105 (11%)
31:60 (43%)
view
16 x 2 frontend/server/src/main...a/org/pytorch/serve/wlm
frontend/server/src/main...serve/workflow/messages
Model.java
DescribeWorkflowResponse.java
111:140 (11%)
31:60 (43%)
view
16 x 2 frontend/server/src/main.../pytorch/serve/ensemble
frontend/server/src/main.../pytorch/serve/ensemble
WorkFlow.java
WorkflowModel.java
183:212 (10%)
52:81 (25%)
view
16 x 2 frontend/server/src/main.../pytorch/serve/ensemble
frontend/server/src/main...a/org/pytorch/serve/wlm
WorkflowModel.java
Model.java
52:81 (25%)
111:140 (11%)
view
16 x 2 frontend/server/src/main...g/pytorch/serve/openapi
frontend/server/src/main...g/pytorch/serve/openapi
OpenApiUtils.java
OpenApiUtils.java
342:358 (3%)
478:494 (3%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 frontend/server/src/main...rch/serve/http/api/rest
frontend/server/src/main...serve/workflow/api/http
ManagementRequestHandler.java
WorkflowInferenceRequestHandler.java
248:263 
71:86 
view
10 x 2 frontend/server/src/main...rch/serve/http/api/rest
frontend/server/src/main...rch/serve/http/api/rest
InferenceRequestHandler.java
InferenceRequestHandler.java
167:179 
181:193 
view
7 x 2 frontend/archive/src/mai...rch/serve/archive/model
frontend/server/src/main.../pytorch/serve/ensemble
Manifest.java
WorkflowManifest.java
145:152 
136:143 
view