facebookresearch / EmbodiedQA
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 178 units with 5,320 lines of code in units (77.7% of code).
    • 1 very complex units (217 lines of code)
    • 5 complex units (1,050 lines of code)
    • 22 medium complex units (1,092 lines of code)
    • 26 simple units (1,151 lines of code)
    • 124 very simple units (1,810 lines of code)
4% | 19% | 20% | 21% | 34%
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
py4% | 19% | 20% | 21% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
data/shortest-path-gen87% | 0% | 11% | 0% | <1%
training0% | 27% | 13% | 23% | 35%
utils0% | 17% | 25% | 20% | 35%
data/question-gen0% | 7% | 41% | 19% | 31%
training/utils0% | 0% | 0% | 35% | 64%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in data/shortest-path-gen/generate-paths-a-star.py
217 54 0
def train()
in training/train_nav.py
303 48 3
def __getitem__()
in training/data.py
278 45 2
def train()
in training/train_eqa.py
260 34 4
def queryLogical()
in data/question-gen/engine.py
91 33 2
def set_target_object()
in utils/house3d.py
118 30 3
def build_graph()
in utils/house3d.py
64 23 2
def questionObjectBuilder()
in data/question-gen/engine.py
108 23 5
def spawn_object()
in utils/house3d.py
48 22 3
def train()
in training/train_vqa.py
93 18 3
def distance()
in data/question-gen/engine.py
30 18 2
def __init__()
in training/data.py
69 17 2
def eval()
in training/train_vqa.py
88 16 3
def __init__()
in training/data.py
103 16 15
def getNearbyPairs()
in data/question-gen/house_parse.py
57 16 4
def queryExist()
in data/question-gen/engine.py
38 16 2
def getEnvWiseStats()
in data/question-gen/entropy_based_filtering.py
28 16 2
def queryRoomCounts()
in data/question-gen/engine.py
24 15 2
def _load_envs()
in training/data.py
64 14 3
def blacklist()
in data/question-gen/engine.py
24 14 2