openai / guided-diffusion
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 275 units with 2,719 lines of code in units (67.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (347 lines of code)
    • 16 simple units (348 lines of code)
    • 254 very simple units (2,024 lines of code)
0% | 0% | 12% | 12% | 74%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 12% | 12% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scripts0% | 0% | 43% | 17% | 38%
guided_diffusion0% | 0% | 5% | 12% | 82%
evaluations0% | 0% | 0% | 7% | 92%
datasets0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
123 21 0
62 14 0
53 12 6
76 12 0
33 11 2
16 10 1
15 9 1
20 9 3
25 8 2
24 8 4
45 8 0
15 7 3
20 7 1
22 7 2
31 7 3
24 7 3
18 6 4
24 6 2
14 6 3
7 6 2
28 6 5
25 5 2
15 5 2
10 5 1
17 5 2
11 5 1
21 5 1
17 5 2
30 4 3
28 4 4
13 4 2
16 4 4
15 4 2
8 4 3
8 4 3
15 4 2
6 4 2
10 4 3
14 4 5
21 4 3
19 4 4
16 4 3
12 4 1
13 4 2
16 4 0
8 4 2
9 4 1
13 3 3
8 3 2
10 3 2