pytorch / ignite
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 860 units with 5,901 lines of code in units (62.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 14 medium complex units (531 lines of code)
    • 58 simple units (1,172 lines of code)
    • 788 very simple units (4,198 lines of code)
0% | 0% | 8% | 19% | 71%
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% | 8% | 19% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ignite/handlers0% | 0% | 15% | 22% | 62%
ignite/distributed0% | 0% | 19% | 6% | 74%
ignite/engine0% | 0% | 13% | 21% | 65%
ignite/metrics0% | 0% | 3% | 27% | 69%
ignite/contrib0% | 0% | 0% | 15% | 84%
ignite0% | 0% | 0% | 46% | 53%
assets/tldr0% | 0% | 0% | 20% | 79%
ignite/base0% | 0% | 0% | 84% | 15%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _run_once_on_dataset()
in ignite/engine/engine.py
60 23 1
def auto_dataloader()
in ignite/distributed/auto.py
60 20 2
def __init__()
in ignite/handlers/param_scheduler.py
42 19 4
def _expand_hostlist()
in ignite/distributed/comp_models/native.py
25 18 1
def _setup_engine()
in ignite/engine/deterministic.py
34 17 1
def __call__()
in ignite/handlers/checkpoint.py
61 17 2
def _setup_ddp_vars_from_slurm_env()
in ignite/distributed/comp_models/native.py
62 15 2
def load_objects()
in ignite/handlers/checkpoint.py
27 15 4
def iteration_completed()
in ignite/metrics/metric.py
26 14 2
def auto_model()
in ignite/distributed/auto.py
30 14 3
def __init__()
in ignite/handlers/param_scheduler.py
21 13 4
def _log_lr_and_loss()
in ignite/handlers/lr_finder.py
34 12 5
def _check_input()
in ignite/metrics/multilabel_confusion_matrix.py
27 11 2
def __call__()
in ignite/handlers/param_scheduler.py
22 11 3
def _internal_is_attached()
in ignite/metrics/metrics_lambda.py
14 10 3
def completed()
in ignite/contrib/metrics/gpu_info.py
31 10 3
def _as_first_started()
in ignite/handlers/time_profilers.py
28 10 2
def update()
in ignite/metrics/gan/fid.py
13 9 2
def update()
in ignite/metrics/recall.py
40 9 2
def sync_all_reduce()
in ignite/metrics/metric.py
30 9 1