facebookresearch / vissl
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,488 units with 15,929 lines of code in units (35.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 45 medium complex units (2,088 lines of code)
    • 101 simple units (2,841 lines of code)
    • 1,342 very simple units (11,000 lines of code)
0% | 0% | 13% | 17% | 69%
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% | 13% | 18% | 68%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
vissl/utils0% | 0% | 17% | 19% | 63%
vissl/data0% | 0% | 13% | 16% | 70%
vissl/hooks0% | 0% | 22% | 25% | 51%
vissl/trainer0% | 0% | 28% | 18% | 53%
extra_scripts0% | 0% | 26% | 7% | 66%
vissl/models0% | 0% | 7% | 23% | 68%
extra_scripts/datasets0% | 0% | 6% | 8% | 85%
vissl/losses0% | 0% | 7% | 22% | 70%
vissl/optimizers0% | 0% | 12% | 8% | 78%
tools0% | 0% | 0% | 35% | 64%
vissl/meters0% | 0% | 0% | 22% | 77%
tools/perf_measurement0% | 0% | 0% | 45% | 54%
website/core0% | 0% | 0% | 0% | 100%
vissl/engines0% | 0% | 0% | 0% | 100%
dev0% | 0% | 0% | 0% | 100%
vissl/config0% | 0% | 0% | 0% | 100%
dev/packaging0% | 0% | 0% | 0% | 100%
website/pages0% | 0% | 0% | 0% | 100%
dev/website_docs0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
hydra_plugins/vissl_plugin0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _rename_basic_resnet_weights()
in extra_scripts/convert_caffe2_to_torchvision_resnet.py
25 24 1
def infer_and_assert_hydra_config()
in vissl/utils/hydra_config.py
74 21 2
def parse_config_from_log()
in extra_scripts/experiment_spreadsheet_from_logs.py
81 21 1
def infer_losses_config()
in vissl/utils/hydra_config.py
95 20 1
def create_regnet_feature_blocks()
in vissl/models/trunks/regnet_fsdp.py
97 20 2
def load()
in vissl/utils/instance_retrieval_utils/data_util.py
61 19 2
def infer_learning_rate()
in vissl/utils/hydra_config.py
50 18 1
def on_phase_end()
in vissl/hooks/tensorboard_hook.py
40 18 2
def __getitem__()
in vissl/data/ssl_dataset.py
35 18 2
def get_scaled_lr_scheduler()
in vissl/utils/hydra_config.py
40 17 3
def _build_model()
in vissl/trainer/train_task.py
35 17 2
def on_update()
in vissl/hooks/log_hooks.py
63 16 2
def cutmixup_collator()
in vissl/data/collators/cutmixup_collator.py
42 16 2
def get_images_labels_info()
in extra_scripts/datasets/create_voc_data_files.py
45 16 2
def get_rmac_region_coordinates()
in vissl/utils/instance_retrieval_utils/rmac.py
39 15 3
def on_update()
in vissl/hooks/tensorboard_hook.py
87 15 2
def train()
in vissl/trainer/trainer_main.py
51 15 1
def create_clevr_count_disk_filelist()
in extra_scripts/datasets/create_clevr_count_data_files.py
33 15 2
def forward()
in vissl/losses/swav_loss.py
81 14 3
def run_knn_at_layer()
in vissl/utils/knn_utils.py
63 14 2