aws / sagemaker-python-sdk
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 1,723 units with 15,753 lines of code in units (54.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (51 lines of code)
    • 26 medium complex units (923 lines of code)
    • 117 simple units (2,544 lines of code)
    • 1,579 very simple units (12,235 lines of code)
0% | <1% | 5% | 16% | 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% | <1% | 5% | 16% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sagemaker0% | <1% | 8% | 19% | 71%
src/sagemaker/local0% | 0% | 15% | 19% | 65%
src/sagemaker/spark0% | 0% | 12% | 6% | 80%
src/sagemaker/workflow0% | 0% | 2% | 18% | 78%
src/sagemaker/cli0% | 0% | 4% | 18% | 76%
src/sagemaker/amazon0% | 0% | 3% | 7% | 88%
src/sagemaker/debugger0% | 0% | 7% | 0% | 92%
src/sagemaker/apiutils0% | 0% | 13% | 14% | 72%
src/sagemaker/lineage0% | 0% | 0% | 18% | 81%
src/sagemaker/model_monitor0% | 0% | 0% | 8% | 91%
src/sagemaker/automl0% | 0% | 0% | 24% | 75%
src/sagemaker/mxnet0% | 0% | 0% | 32% | 67%
src/sagemaker/huggingface0% | 0% | 0% | 20% | 79%
ci-scripts0% | 0% | 0% | 37% | 62%
src/sagemaker/rl0% | 0% | 0% | 22% | 77%
src/sagemaker/chainer0% | 0% | 0% | 28% | 71%
src/sagemaker/tensorflow0% | 0% | 0% | 10% | 89%
src/sagemaker/feature_store0% | 0% | 0% | 0% | 100%
src/sagemaker/pytorch0% | 0% | 0% | 0% | 100%
src/sagemaker/xgboost0% | 0% | 0% | 0% | 100%
src/sagemaker/sklearn0% | 0% | 0% | 0% | 100%
src/sagemaker/wrangler0% | 0% | 0% | 0% | 100%
src/sagemaker/async_inference0% | 0% | 0% | 0% | 100%
src/sagemaker/dataset_definition0% | 0% | 0% | 0% | 100%
src/sagemaker/training_compiler0% | 0% | 0% | 0% | 100%
src/sagemaker/serverless0% | 0% | 0% | 0% | 100%
src/sagemaker/sparkml0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def validate_mp_config()
in src/sagemaker/fw_utils.py
51 27 1
def _get_train_args()
in src/sagemaker/estimator.py
59 19 4
56 17 3
def start()
in src/sagemaker/local/entities.py
55 16 5
def _processor()
in src/sagemaker/image_uris.py
33 16 2
def training_base_config()
in src/sagemaker/workflow/airflow.py
51 16 4
def _validate_and_set_debugger_configs()
in src/sagemaker/estimator.py
22 15 1
def to_boto()
in src/sagemaker/apiutils/_boto_functions.py
16 15 3
def modify_node()
in src/sagemaker/cli/compatibility/v2/modifiers/image_uris.py
36 14 2
def _to_request_dict()
in src/sagemaker/drift_check_baselines.py
33 14 1
def retrieve_artifacts()
in src/sagemaker/local/image.py
43 13 4
def _generate_compose_file()
in src/sagemaker/local/image.py
41 13 4
def _prepare_for_training()
in src/sagemaker/estimator.py
33 13 2
def logs_for_processing_job()
in src/sagemaker/session.py
36 13 4
def logs_for_transform_job()
in src/sagemaker/session.py
36 13 4
def __init__()
in src/sagemaker/debugger/metrics_config.py
26 13 6
def _stage_submit_deps()
in src/sagemaker/spark/processing.py
54 13 3
def _hyperparameter_range_and_class()
in src/sagemaker/algorithm.py
31 12 3
def _normalize_inputs()
in src/sagemaker/processing.py
32 12 3
def start()
in src/sagemaker/local/entities.py
29 11 5