facebookresearch / grounding-inductive-biases
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 472 units with 4,062 lines of code in units (62.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (482 lines of code)
    • 5 medium complex units (273 lines of code)
    • 9 simple units (280 lines of code)
    • 456 very simple units (3,027 lines of code)
0% | 11% | 6% | 6% | 74%
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% | 11% | 6% | 6% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
data_utils0% | 73% | 0% | 0% | 26%
data_augmentation0% | 27% | 36% | 17% | 18%
utils0% | 0% | 19% | 0% | 80%
augerino_lib0% | 0% | 0% | 10% | 89%
experiment_utils0% | 0% | 0% | 59% | 40%
similarity_search_experiments0% | 0% | 0% | 13% | 86%
models0% | 0% | 0% | 34% | 65%
equivariance_measure0% | 0% | 0% | 0% | 100%
per_class_augmentation0% | 0% | 0% | 0% | 100%
auto_augment0% | 0% | 0% | 0% | 100%
foreground_variation0% | 0% | 0% | 0% | 100%
image_similarity0% | 0% | 0% | 0% | 100%
wordnet_analysis0% | 0% | 0% | 0% | 100%
minimal_checkpoint_example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main_worker()
in data_augmentation/my_training.py
177 33 5
def return_loader_and_sampler()
in data_utils/functions.py
305 27 4
def restart_from_checkpoint()
in utils/checkpointing.py
35 18 4
def validate()
in data_augmentation/my_training.py
48 16 4
def main_worker()
in data_augmentation/test.py
92 15 4
def test()
in data_augmentation/test.py
49 14 6
def train()
in data_augmentation/my_training.py
49 11 6
def boosts_to_dataframe()
in similarity_search_experiments/similarity_search.py
23 10 2
def get_directional_transform_name()
in similarity_search_experiments/correlate_rank_with_invariance_gap.py
14 8 2
def experiment()
in data_augmentation/hydra_app_local.py
40 7 1
def create_repo()
in data_augmentation/my_training.py
28 7 2
def experiment()
in data_augmentation/hydra_test_local.py
47 7 1
def create_generators()
in augerino_lib/uniform_aug.py
44 7 2
def _make_layer()
in models/arch.py
32 7 8
def create_new_experiment()
in experiment_utils/experiment_repo.py
42 7 5
def forward()
in augerino_lib/aug_modules.py
10 6 3
def compute_probabilities()
in per_class_augmentation/augmentations.py
15 5 2
def run_model()
in data_augmentation/my_training.py
22 5 3
def return_loader_and_sampler()
in data_utils/functions_bis.py
37 5 4
def _setup_size()
in utils/mytransforms.py
8 5 2