aws-samples / amazon-sagemaker-build-train-deploy
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 32 units with 587 lines of code in units (36.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 (190 lines of code)
    • 30 very simple units (397 lines of code)
0% | 0% | 0% | 32% | 67%
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% | 32% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
08_projects/modelbuild/pipelines/endtoendmlsm0% | 0% | 0% | 83% | 16%
02_data_exploration_and_feature_eng0% | 0% | 0% | 100% | 0%
03_train_model/source_dir0% | 0% | 0% | 0% | 100%
04_deploy_model0% | 0% | 0% | 0% | 100%
08_projects/modelbuild/pipelines/endtoendmlsm/train0% | 0% | 0% | 0% | 100%
08_projects/modelbuild/pipelines/endtoendmlsm/deploy0% | 0% | 0% | 0% | 100%
04_deploy_model/sklearn_source_dir0% | 0% | 0% | 0% | 100%
04_deploy_model/xgboost_source_dir0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_pipeline()
in 08_projects/modelbuild/pipelines/endtoendmlsm/workflow.py
166 8 7
def cleanup_glue_resources()
in 02_data_exploration_and_feature_eng/notebook_utilities.py
24 8 0
def output_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/xgboost/inference.py
14 5 2
def output_fn()
in 04_deploy_model/xgboost_source_dir/inference.py
14 5 2
def output_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/sklearn/inference.py
11 4 2
def output_fn()
in 04_deploy_model/sklearn_source_dir/inference.py
11 4 2
def input_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/sklearn/inference.py
9 3 2
def get_pipeline_custom_tags()
in 08_projects/modelbuild/pipelines/endtoendmlsm/workflow.py
11 3 3
def input_fn()
in 04_deploy_model/sklearn_source_dir/inference.py
9 3 2
def run_model_monitor_job_processor()
in 04_deploy_model/monitoringjob_utils.py
53 3 11
def input_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/xgboost/inference.py
8 2 2
def get_latest_training_job_name()
in 04_deploy_model/notebook_utilities.py
8 2 1
def input_fn()
in 04_deploy_model/xgboost_source_dir/inference.py
8 2 2
def parse_args()
in 08_projects/modelbuild/pipelines/endtoendmlsm/train/train.py
14 1 0
def main()
in 08_projects/modelbuild/pipelines/endtoendmlsm/train/train.py
40 1 0
def predict_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/sklearn/inference.py
3 1 2
def model_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/sklearn/inference.py
3 1 1
def model_fn()
in 08_projects/modelbuild/pipelines/endtoendmlsm/deploy/xgboost/inference.py
4 1 1
def get_sagemaker_client()
in 08_projects/modelbuild/pipelines/endtoendmlsm/workflow.py
4 1 1
def get_session()
in 08_projects/modelbuild/pipelines/endtoendmlsm/workflow.py
10 1 2