awslabs / mlmax
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 86 units with 957 lines of code in units (24.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 3 simple units (136 lines of code)
    • 83 very simple units (821 lines of code)
0% | 0% | 0% | 14% | 85%
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% | 0% | 14% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
modules/pipeline0% | 0% | 0% | 27% | 72%
src/mlmax0% | 0% | 0% | 15% | 84%
modules/environment/util0% | 0% | 0% | 0% | 100%
modules/monitoring0% | 0% | 0% | 0% | 100%
modules/data0% | 0% | 0% | 0% | 100%
modules/data/src0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def psi()
in src/mlmax/monitoring.py
31 8 3
def main()
in src/mlmax/monitoring.py
30 7 1
def example_run_training_pipeline()
in modules/pipeline/training_pipeline_run.py
75 7 2
def main()
in src/mlmax/preprocessing.py
19 4 1
def generate_statistic()
in src/mlmax/monitoring.py
19 4 3
def example_run_inference_pipeline()
in modules/pipeline/inference_pipeline_run.py
49 3 2
def tags()
in modules/environment/util/screening/smconfig.py
6 3 1
def transform()
in src/mlmax/preprocessing.py
13 2 3
def get_num_distribution()
in src/mlmax/monitoring.py
12 2 1
def get_cat_counts()
in src/mlmax/monitoring.py
5 2 1
def get_psi_score()
in src/mlmax/monitoring.py
10 2 3
def get_expected_model()
in modules/pipeline/custom_steps.py
8 2 2
def vpc_config()
in modules/environment/util/screening/smconfig.py
7 2 1
def train()
in modules/environment/util/screening/smconfig.py
13 2 1
def model()
in modules/environment/util/screening/smconfig.py
9 2 1
def bt()
in modules/environment/util/screening/smconfig.py
8 2 1
def processing()
in modules/environment/util/screening/smconfig.py
17 2 1
def endslash()
in modules/environment/util/screening/smconfig.py
4 2 1
def example_run_monitor_pipeline()
in modules/monitoring/monitor_pipeline_run.py
38 2 3
def example_run_data_pipeline()
in modules/data/data_pipeline_run.py
28 2 2