facebookresearch / neural-scs
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 168 units with 2,407 lines of code in units (83.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (615 lines of code)
    • 12 simple units (258 lines of code)
    • 143 very simple units (1,534 lines of code)
0% | 0% | 25% | 10% | 63%
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% | 25% | 10% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
automl21/scs_neural/experimentation0% | 0% | 58% | 11% | 30%
automl21/scs_neural/solver0% | 0% | 14% | 18% | 66%
automl21/accel0% | 0% | 30% | 0% | 69%
automl21/scs_neural/utils0% | 0% | 49% | 10% | 40%
automl210% | 0% | 0% | 0% | 100%
automl21/scs_neural/problem0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def solve()
in automl21/scs_neural/solver/neural_scs_batched.py
84 25 10
def _learn_batched()
in automl21/scs_neural/experimentation/launcher.py
91 21 1
def _plot_test_results()
in automl21/scs_neural/experimentation/launcher.py
63 17 5
def _plot_metrics()
in automl21/scs_neural/experimentation/launcher.py
48 16 8
def _convert_to_sequential_list()
in automl21/scs_neural/solver/neural_scs_batched.py
35 15 4
def _plot_train_results()
in automl21/scs_neural/experimentation/launcher.py
42 13 5
def _extract_aggregate_metrics()
in automl21/scs_neural/experimentation/launcher.py
57 13 4
def mlp()
in automl21/accel/utils.py
33 12 7
def mlp()
in automl21/scs_neural/utils/utils.py
33 12 7
def init_instance()
in automl21/accel/neural_rec.py
38 11 3
def init_instance()
in automl21/accel/neural_rec.py
34 11 3
def get_cone_boundaries()
in automl21/scs_neural/utils/utils.py
26 11 2
def select_instances_sparse()
in automl21/scs_neural/solver/neural_scs_batched.py
31 11 3
def _extract_individual_metrics()
in automl21/scs_neural/experimentation/launcher.py
24 10 3
def plot_aggregate_results()
in automl21/scs_neural/experimentation/launcher.py
33 7 5
def _compute_scaled_loss()
in automl21/scs_neural/solver/neural_scs_batched.py
14 7 4
def _get_objectives()
in automl21/scs_neural/solver/neural_scs_batched.py
25 7 5
def dprojection()
in automl21/scs_neural/solver/cone_projection.py
19 7 3
def pi()
in automl21/scs_neural/solver/cone_projection.py
17 7 3
def uncoalesce_projection()
in automl21/scs_neural/utils/utils.py
12 6 3