microsoft / MLOpsPython
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 55 units with 1,043 lines of code in units (49.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (153 lines of code)
    • 4 simple units (306 lines of code)
    • 49 very simple units (584 lines of code)
0% | 0% | 14% | 29% | 55%
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% | 14% | 29% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
diabetes_regression/register0% | 0% | 85% | 0% | 14%
diabetes_regression/scoring0% | 0% | 33% | 0% | 66%
ml_service/pipelines0% | 0% | 0% | 42% | 57%
diabetes_regression/training0% | 0% | 0% | 73% | 26%
ml_service/util0% | 0% | 0% | 27% | 72%
bootstrap0% | 0% | 0% | 0% | 100%
diabetes_regression/util0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_args()
in diabetes_regression/scoring/parallel_batchscore.py
45 16 0
def main()
in diabetes_regression/register/register_model.py
108 12 0
def main()
in ml_service/pipelines/run_train_pipeline.py
52 10 0
def main()
in ml_service/pipelines/diabetes_regression_build_train_pipeline.py
136 9 0
def get_compute()
in ml_service/util/attach_compute.py
26 9 4
def main()
in diabetes_regression/training/train_aml.py
92 8 0
def validate_args()
in bootstrap/bootstrap.py
7 5 1
def run()
in diabetes_regression/scoring/parallel_batchscore.py
15 5 1
def get_pipeline()
in ml_service/pipelines/run_parallel_batchscore_pipeline.py
15 5 3
def rename_files()
in bootstrap/bootstrap.py
13 4 1
def rename_dir()
in bootstrap/bootstrap.py
11 4 1
def clean_dir()
in bootstrap/bootstrap.py
6 4 1
def call_web_app()
in ml_service/util/smoke_test_scoring_service.py
16 4 2
def delete_dir()
in bootstrap/bootstrap.py
8 3 1
def replace_project_name()
in bootstrap/bootstrap.py
34 3 3
def run()
in diabetes_regression/scoring/score.py
11 3 2
def main()
in diabetes_regression/training/train.py
11 3 0
def get_fallback_input_dataset()
in ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py
24 3 2
def create_sample_data_csv()
in ml_service/pipelines/load_sample_data.py
9 3 2
def run_batchscore_pipeline()
in ml_service/pipelines/run_parallel_batchscore_pipeline.py
25 3 0