aws-samples / amazon-sagemaker-managed-spot-training
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 47 units with 536 lines of code in units (59.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (63 lines of code)
    • 2 simple units (60 lines of code)
    • 44 very simple units (413 lines of code)
0% | 0% | 11% | 11% | 77%
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% | 11% | 11% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pytorch_managed_spot_training_checkpointing/source_dir0% | 0% | 54% | 0% | 45%
mxnet_managed_spot_training_checkpointing/source_dir0% | 0% | 0% | 33% | 66%
tensorflow_managed_spot_training_checkpointing0% | 0% | 0% | 35% | 64%
tensorflow_managed_spot_training_checkpointing/source_dir0% | 0% | 0% | 0% | 100%
tensorflow_2_managed_spot_training_checkpointing0% | 0% | 0% | 0% | 100%
pytorch_managed_spot_training_checkpointing0% | 0% | 0% | 0% | 100%
xgboost_script_mode_managed_spot_training_checkpointing0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _train()
in pytorch_managed_spot_training_checkpointing/source_dir/cifar10.py
63 11 1
def train()
in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py
41 8 10
def main()
in tensorflow_managed_spot_training_checkpointing/generate_cifar10_tfrecords.py
19 6 1
def load_model_from_checkpoints()
in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py
14 4 1
def load_model_from_checkpoints()
in tensorflow_managed_spot_training_checkpointing/source_dir/cifar10_keras_main.py
13 4 1
def num_examples_per_epoch()
in tensorflow_managed_spot_training_checkpointing/source_dir/cifar10_keras_main.py
9 4 1
def load_model_from_checkpoints()
in tensorflow_2_managed_spot_training_checkpointing/mnist.py
13 4 1
def model_fn()
in pytorch_managed_spot_training_checkpointing/source_dir/cifar10.py
10 3 1
def find_file()
in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py
4 3 2
def get_training_context()
in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py
5 3 1
def save()
in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py
7 3 2
def convert_to_tfrecord()
in tensorflow_managed_spot_training_checkpointing/generate_cifar10_tfrecords.py
15 3 2
def keras_model_fn()
in tensorflow_managed_spot_training_checkpointing/source_dir/cifar10_keras_main.py
43 3 4
def _input()
in tensorflow_managed_spot_training_checkpointing/source_dir/cifar10_keras_main.py
19 3 4
def main()
in tensorflow_managed_spot_training_checkpointing/source_dir/cifar10_keras_main.py
37 3 1
def neo_preprocess()
in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py
9 2 2
def _xgb_train()
in xgboost_script_mode_managed_spot_training_checkpointing/abalone.py
13 2 7
def download_and_extract()
in tensorflow_managed_spot_training_checkpointing/generate_cifar10_tfrecords.py
3 2 1
def _get_file_names()
in tensorflow_managed_spot_training_checkpointing/generate_cifar10_tfrecords.py
6 2 0
def read_pickle_from_file()
in tensorflow_managed_spot_training_checkpointing/generate_cifar10_tfrecords.py
6 2 1