facebookresearch / exploring_exploration
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 409 units with 8,352 lines of code in units (64.2% of code).
    • 3 very complex units (1,082 lines of code)
    • 4 complex units (1,009 lines of code)
    • 9 medium complex units (944 lines of code)
    • 40 simple units (1,746 lines of code)
    • 353 very simple units (3,571 lines of code)
12% | 12% | 11% | 20% | 42%
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
py12% | 12% | 11% | 20% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT38% | 39% | 21% | 0% | 0%
exploring_exploration/utils20% | 0% | 0% | 13% | 66%
reconstruction_data_generation0% | 93% | 0% | 0% | 6%
environments/gym-avd0% | 0% | 10% | 42% | 46%
exploring_exploration/models0% | 0% | 16% | 19% | 63%
exploring_exploration/algo0% | 0% | 0% | 45% | 54%
exploring_exploration/envs0% | 0% | 0% | 18% | 81%
reconstruction_data_generation/mp3d0% | 0% | 0% | 83% | 16%
reconstruction_data_generation/avd0% | 0% | 0% | 75% | 25%
exploring_exploration0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in train_reconstruction_exploration.py
427 66 0
def main()
in train_curiosity_exploration.py
383 64 0
def evaluate_tdn_astar()
in exploring_exploration/utils/eval.py
272 61 5
def main()
in train_exploration.py
320 50 0
def main()
in pretrain_imitation.py
300 47 0
def main()
in pretrain_reconstruction.py
219 35 0
def main()
in reconstruction_data_generation/generate_imagenet_clusters.py
170 28 1
def act()
in exploring_exploration/models/navigation.py
72 23 5
def act()
in exploring_exploration/models/navigation.py
80 22 5
def main()
in evaluate_reconstruction.py
154 19 0
def main()
in evaluate_pose_estimation.py
180 18 0
def act()
in exploring_exploration/models/frontier_agent.py
54 17 4
def main()
in evaluate_visitation.py
126 16 0
def _sample_pose_refs()
in environments/gym-avd/gym_avd/envs/avd_recon_env.py
96 15 1
def _sample_pose_refs()
in environments/gym-avd/gym_avd/envs/avd_nav_env.py
91 13 1
def _sample_pose_refs()
in environments/gym-avd/gym_avd/envs/avd_pose_env.py
91 13 1
def _sample_target()
in environments/gym-avd/gym_avd/envs/avd_nav_env.py
57 10 1
def generate_topdown_occupancy()
in environments/gym-avd/gym_avd/envs/avd_nav_env.py
73 9 1
def object_visitation_check()
in environments/gym-avd/gym_avd/envs/avd_pose_env.py
22 9 1
def process_scene()
in environments/gym-avd/preprocess_raw_data.py
73 9 2