aws-samples / amazon-mlops-example-tensorflow
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 22 units with 161 lines of code in units (24.6% 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)
    • 1 simple units (13 lines of code)
    • 21 very simple units (148 lines of code)
0% | 0% | 0% | 8% | 91%
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% | 8% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
inference0% | 0% | 0% | 24% | 75%
train0% | 0% | 0% | 0% | 100%
preprocess0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def input_handler()
in inference/inference.py
13 6 2
def train_model()
in train/train.py
19 4 2
def cleanup()
in inference/etl.py
15 3 2
def parse_args()
in train/train.py
5 2 0
def call()
in train/CustomModel.py
7 2 2
def update_state()
in train/CustomModel.py
7 2 4
def define_network()
in train/CustomModel.py
16 2 1
def output_handler()
in inference/inference.py
6 2 2
def load_training_data()
in train/train.py
4 1 1
def save_model()
in train/train.py
3 1 2
def save_tokenizer()
in train/train.py
8 1 1
def __init__()
in train/CustomModel.py
4 1 3
def build()
in train/CustomModel.py
6 1 2
def __init__()
in train/CustomModel.py
4 1 3
def result()
in train/CustomModel.py
2 1 1
def reset_states()
in train/CustomModel.py
3 1 1
def npy_to_s3()
in preprocess/input_data_etl.py
8 1 4
def read_data()
in preprocess/input_data_etl.py
11 1 1
def fitandtokenize()
in inference/etl.py
6 1 1
def get_tokenizer()
in inference/etl.py
5 1 1