aws-samples / sagemaker-101-workshop
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 35 units with 467 lines of code in units (67.1% 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)
    • 5 simple units (162 lines of code)
    • 30 very simple units (305 lines of code)
0% | 0% | 0% | 34% | 65%
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% | 34% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
builtin_algorithm_hpo_tabular/util0% | 0% | 0% | 66% | 33%
pytorch_alternatives/custom_pytorch_nlp/util0% | 0% | 0% | 37% | 62%
custom_tensorflow_keras_nlp/util0% | 0% | 0% | 51% | 48%
pytorch_alternatives/custom_pytorch_nlp/src0% | 0% | 0% | 0% | 100%
pytorch_alternatives/migration_challenge_pytorch_image/util0% | 0% | 0% | 0% | 100%
custom_tensorflow_keras_nlp/src0% | 0% | 0% | 0% | 100%
pytorch_alternatives/migration_challenge_pytorch_image/src0% | 0% | 0% | 0% | 100%
migration_challenge_keras_image/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def plot_confusion_matrix()
in builtin_algorithm_hpo_tabular/util/classification_report.py
38 8 7
def get_word_embeddings()
in custom_tensorflow_keras_nlp/util/preprocessing.py
35 8 3
def get_word_embeddings()
in pytorch_alternatives/custom_pytorch_nlp/util/preprocessing.py
35 7 3
def plot_precision_recall_curve()
in builtin_algorithm_hpo_tabular/util/classification_report.py
23 6 4
def plot_roc_curve()
in builtin_algorithm_hpo_tabular/util/classification_report.py
31 6 4
def wait_for_file_stable()
in pytorch_alternatives/custom_pytorch_nlp/util/preprocessing.py
13 5 3
def wait_for_file_stable()
in custom_tensorflow_keras_nlp/util/preprocessing.py
13 5 3
def plot_text()
in builtin_algorithm_hpo_tabular/util/classification_report.py
14 4 2
def generate_classification_report()
in builtin_algorithm_hpo_tabular/util/classification_report.py
33 4 6
def upload_in_background()
in pytorch_alternatives/migration_challenge_pytorch_image/util/nb.py
30 4 2
def train()
in pytorch_alternatives/custom_pytorch_nlp/src/main.py
32 4 1
def download_dataset()
in pytorch_alternatives/custom_pytorch_nlp/util/preprocessing.py
20 3 0
def tokenize_and_pad_docs()
in pytorch_alternatives/custom_pytorch_nlp/util/preprocessing.py
19 3 3
def tokenize_and_pad_docs()
in custom_tensorflow_keras_nlp/util/preprocessing.py
14 3 3
def model_fn()
in pytorch_alternatives/migration_challenge_pytorch_image/src/main.py
4 2 1
def __getitem__()
in pytorch_alternatives/custom_pytorch_nlp/src/main.py
4 2 2
def parse_args()
in pytorch_alternatives/custom_pytorch_nlp/src/main.py
12 2 0
def test()
in pytorch_alternatives/custom_pytorch_nlp/src/main.py
14 2 3
def model_fn()
in pytorch_alternatives/custom_pytorch_nlp/src/main.py
4 2 1
def parse_args()
in custom_tensorflow_keras_nlp/src/main.py
12 2 0