aws-samples / amazon-sagemaker-data-quality-monitor-custom-preprocessing
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 21 units with 251 lines of code in units (85.7% 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)
    • 2 simple units (45 lines of code)
    • 19 very simple units (206 lines of code)
0% | 0% | 0% | 17% | 82%
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% | 17% | 82%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 0% | 17% | 82%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def preprocess_handler()
in src/preprocessor.py
18 8 1
def generate_artificial_traffic()
in src/artificial_traffic.py
27 6 6
def output_fn()
in src/inference.py
10 5 2
def input_fn()
in src/inference.py
11 4 2
def run_model_monitor_job_processor()
in src/monitoringjob_utils.py
56 3 11
def test_indicator_exist()
in src/preprocessor.py
2 2 1
def eval_test_indicator()
in src/preprocessor.py
5 2 1
def get_class_val()
in src/preprocessor.py
3 2 1
def predict_fn()
in src/inference.py
11 2 2
def create_data_quality_monitor()
in src/demo_data_quality_model_monitor.py
43 2 1
def write_to_file()
in src/preprocessor.py
3 1 2
def str_to_bool()
in src/preprocessor.py
2 1 1
def model_fn()
in src/inference.py
4 1 1
def __init__()
in src/demo_data_quality_model_monitor.py
16 1 12
def __init__()
in src/artificial_traffic.py
3 1 2
def increment_id()
in src/artificial_traffic.py
2 1 1
def random_gaussian()
in src/artificial_traffic.py
3 1 2
def random_bit()
in src/artificial_traffic.py
2 1 2
def random_int()
in src/artificial_traffic.py
3 1 2
def get_model_monitor_container_uri()
in src/monitoringjob_utils.py
24 1 1