facebookresearch / sound-spaces
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 649 units with 7,365 lines of code in units (52.4% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (402 lines of code)
    • 30 medium complex units (1,779 lines of code)
    • 28 simple units (915 lines of code)
    • 589 very simple units (4,269 lines of code)
0% | 5% | 24% | 12% | 57%
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% | 5% | 24% | 12% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ss_baselines/savi0% | 14% | 18% | 18% | 48%
ss_baselines/av_wan0% | 0% | 38% | 6% | 55%
scripts0% | 0% | 51% | 17% | 31%
ss_baselines/common0% | 0% | 21% | 14% | 63%
ss_baselines/av_nav0% | 0% | 24% | 8% | 67%
soundspaces0% | 0% | 28% | 4% | 67%
soundspaces/tasks0% | 0% | 0% | 0% | 100%
soundspaces/datasets0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def train()
in ss_baselines/savi/ddppo/algo/ddppo_trainer.py
283 46 1
def run()
in ss_baselines/savi/pretraining/audiogoal_trainer.py
119 28 3
def train()
in ss_baselines/savi/ppo/ppo_trainer.py
176 24 1
def _setup_actor_critic_agent()
in ss_baselines/savi/ddppo/algo/ddppo_trainer.py
111 23 3
def train()
in ss_baselines/av_wan/ppo/ppo_trainer.py
174 22 1
def __call__()
in ss_baselines/common/sync_vector_env.py
39 22 3
def observations_to_image()
in ss_baselines/common/utils.py
110 21 3
def update()
in ss_baselines/av_wan/models/mapper.py
64 19 4
def update()
in ss_baselines/savi/models/belief_predictor.py
53 19 3
def train()
in ss_baselines/av_nav/ppo/ppo_trainer.py
140 19 1
def interactive_demo()
in scripts/interactive_demo.py
62 19 2
def __init__()
in ss_baselines/savi/ppo/policy.py
44 16 6
def __init__()
in ss_baselines/av_wan/ppo/policy.py
36 15 6
def step()
in soundspaces/simulator.py
64 15 3
def _map_to_graph()
in ss_baselines/av_wan/models/planner.py
30 14 2
def adjust_graph()
in scripts/generate_replica_metadata.py
34 14 3
def find_best_ckpt_idx()
in ss_baselines/savi/run.py
25 13 3
def __init__()
in ss_baselines/savi/models/smt_resnet.py
40 13 10
def __init__()
in ss_baselines/av_nav/ppo/policy.py
37 13 5
def _compute_audiogoal()
in soundspaces/simulator.py
50 13 1