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).
def main() in sagemaker-training-compiler/huggingface/pytorch_multiple_gpu_single_node/scripts/run_mlm.py
272
74
0
def main() in sagemaker-training-compiler/huggingface/pytorch_multiple_gpu_multiple_node/scripts/run_mlm.py
274
74
0
def main() in sagemaker-training-compiler/huggingface/pytorch_multiple_gpu_single_node/scripts/run_clm.py
258
70
0
def main() in sagemaker-training-compiler/huggingface/pytorch_multiple_gpu_multiple_node/scripts/run_clm.py
266
70
0
def main() in training/distributed_training/pytorch/model_parallel/gpt2/train_gpt_simple.py
219
56
0
def main() in training/distributed_training/pytorch/model_parallel/bert/bert_example/sagemaker_smp_pretrain.py
256
54
0
def train() in sagemaker-python-sdk/mxnet_horovod_maskrcnn/source/train_mask_rcnn.py
169
48
8
def train() in sagemaker-python-sdk/mxnet_horovod_fasterrcnn/source/train_faster_rcnn.py
141
43
8
def prepare_model_and_optimizer() in training/distributed_training/pytorch/model_parallel/bert/bert_example/sagemaker_smp_pretrain.py
99
42
2
def builder() in reinforcement_learning/rl_network_compression_ray_custom/src/tensorflow_resnet/compressor/resnet.py
186
40
4
def load_tensors() in sagemaker-debugger/mnist_tensor_plot/tensor_plot.py
57
34
1
def load_tensors() in aws_sagemaker_studio/sagemaker_debugger/mnist_tensor_plot/tensor_plot.py
57
34
1
def _transform() in sagemaker-debugger/model_specific_realtime_analysis/bert_attention_head_view/entry_point/data.py
120
33
2
def deploy_model() in reinforcement_learning/bandits_statlog_vw_customEnv/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96
32
4
def deploy_model() in reinforcement_learning/rl_cartpole_coach/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96
32
4
def deploy_model() in reinforcement_learning/rl_network_compression_ray_custom/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96
32
4
def deploy_model() in reinforcement_learning/rl_hvac_coach_energyplus/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96
32
4
def deploy_model() in reinforcement_learning/rl_portfolio_management_coach_customEnv/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96
32
4
def deploy_model() in reinforcement_learning/rl_cartpole_ray/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96
32
4
def deploy_model() in reinforcement_learning/common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py