aws-samples / amazon-sagemaker-script-mode
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 111 units with 1,153 lines of code in units (61.3% 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)
    • 6 simple units (233 lines of code)
    • 105 very simple units (920 lines of code)
0% | 0% | 0% | 20% | 79%
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% | 20% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tf-distribution-options0% | 0% | 0% | 26% | 73%
tf-batch-inference-script0% | 0% | 0% | 32% | 67%
tf-horovod-inference-pipeline0% | 0% | 0% | 30% | 69%
tf-2-data-parallelism0% | 0% | 0% | 0% | 100%
tf-sentiment-script-mode0% | 0% | 0% | 0% | 100%
tf-2-word-embeddings0% | 0% | 0% | 0% | 100%
hugging-face-lambda-step0% | 0% | 0% | 0% | 100%
deploy-pretrained-model0% | 0% | 0% | 0% | 100%
tf-eager-script-mode0% | 0% | 0% | 0% | 100%
tf-2-workflow-smpipelines0% | 0% | 0% | 0% | 100%
tf-2-workflow0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in tf-distribution-options/code/train_hvd.py
61 10 1
def main()
in tf-batch-inference-script/code/train.py
61 9 1
def main()
in tf-horovod-inference-pipeline/train.py
54 9 1
def main()
in tf-distribution-options/generate_cifar10_tfrecords.py
19 6 1
def main()
in tf-batch-inference-script/generate_cifar10_tfrecords.py
19 6 1
def main()
in tf-horovod-inference-pipeline/generate_cifar10_tfrecords.py
19 6 1
def main()
in tf-distribution-options/code/train_ps.py
34 5 1
def get_model()
in tf-distribution-options/code/model_def.py
46 5 7
def get_model()
in tf-batch-inference-script/code/model_def.py
46 5 7
def keras_model_fn()
in tf-horovod-inference-pipeline/train.py
47 5 6
def num_examples_per_epoch()
in tf-distribution-options/code/train_ps.py
9 4 1
def num_examples_per_epoch()
in tf-distribution-options/code/train_hvd.py
9 4 1
def num_examples_per_epoch()
in tf-batch-inference-script/code/train.py
9 4 1
def num_examples_per_epoch()
in tf-horovod-inference-pipeline/train.py
9 4 1
def train()
in tf-2-data-parallelism/src/train_resnet_sdp_debug.py
33 3 1
def get_resnet50()
in tf-2-data-parallelism/src/model_def.py
25 3 1
def input_handler()
in tf-distribution-options/code/inference.py
8 3 2
def process_input()
in tf-distribution-options/code/utilities.py
20 3 5
def convert_to_tfrecord()
in tf-distribution-options/generate_cifar10_tfrecords.py
15 3 2
def input_handler()
in tf-batch-inference-script/code/inference.py
8 3 2