aws / sagemaker-xgboost-container
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 298 units with 2,869 lines of code in units (82.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (208 lines of code)
    • 14 medium complex units (604 lines of code)
    • 30 simple units (625 lines of code)
    • 253 very simple units (1,432 lines of code)
0% | 7% | 21% | 21% | 49%
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% | 7% | 21% | 22% | 49%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sagemaker_xgboost_container/algorithm_mode0% | 22% | 29% | 16% | 31%
src/sagemaker_xgboost_container0% | 0% | 15% | 39% | 45%
src/sagemaker_xgboost_container/dmlc_patch0% | 0% | 32% | 21% | 46%
src/sagemaker_algorithm_toolkit0% | 0% | 8% | 8% | 83%
src/sagemaker_xgboost_container/mms_patch0% | 0% | 28% | 0% | 72%
src/sagemaker_xgboost_container/metrics0% | 0% | 0% | 0% | 100%
docker/1.3-1/resources/mms0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def initialize()
in src/sagemaker_xgboost_container/algorithm_mode/hyperparameter_validation.py
208 30 1
def train_job()
in src/sagemaker_xgboost_container/algorithm_mode/train.py
98 23 7
def accept_slaves()
in src/sagemaker_xgboost_container/dmlc_patch/tracker.py
69 20 2
def validate()
in src/sagemaker_algorithm_toolkit/hyperparameter_validation.py
38 16 2
def assign_rank()
in src/sagemaker_xgboost_container/dmlc_patch/tracker.py
58 16 6
def get_dmatrix()
in src/sagemaker_xgboost_container/data_utils.py
42 14 4
def start()
in src/sagemaker_xgboost_container/checkpointing.py
38 14 1
def validate_data_file_path()
in src/sagemaker_xgboost_container/data_utils.py
24 13 2
def get_selected_predictions()
in src/sagemaker_xgboost_container/algorithm_mode/serve_utils.py
32 13 4
def get_callbacks_watchlist()
in src/sagemaker_xgboost_container/algorithm_mode/train.py
35 12 10
def predict()
in src/sagemaker_xgboost_container/algorithm_mode/serve_utils.py
34 12 5
def transform()
in src/sagemaker_xgboost_container/mms_patch/mms_transformer.py
35 11 3
def __init__()
in src/sagemaker_xgboost_container/distributed.py
32 11 7
def get_validated_dmatrices()
in src/sagemaker_xgboost_container/algorithm_mode/train.py
21 11 6
def sagemaker_train()
in src/sagemaker_xgboost_container/algorithm_mode/train.py
48 11 8
def get_content_type()
in src/sagemaker_xgboost_container/data_utils.py
19 10 1
def _get_csv_dmatrix_pipe_mode()
in src/sagemaker_xgboost_container/data_utils.py
28 10 2
def get_recordio_protobuf_dmatrix()
in src/sagemaker_xgboost_container/data_utils.py
26 10 2
def validate()
in src/sagemaker_algorithm_toolkit/channel_validation.py
20 9 2
def start()
in src/sagemaker_xgboost_container/distributed.py
37 9 1