awslabs / syne-tune
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 1,660 units with 15,855 lines of code in units (80.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (346 lines of code)
    • 46 medium complex units (2,351 lines of code)
    • 108 simple units (2,987 lines of code)
    • 1,503 very simple units (10,171 lines of code)
0% | 2% | 14% | 18% | 64%
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% | 2% | 14% | 18% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
benchmarking/cli0% | 38% | 0% | 53% | 8%
syne_tune/optimizer0% | <1% | 15% | 17% | 65%
benchmarking/blackbox_repository0% | 0% | 23% | 27% | 48%
syne_tune/backend0% | 0% | 12% | 18% | 69%
benchmarking/nursery0% | 0% | 42% | 0% | 57%
syne_tune0% | 0% | 8% | 11% | 79%
benchmarking/benchmark_loop0% | 0% | 67% | 0% | 32%
benchmarking/training_scripts0% | 0% | 0% | 23% | 76%
benchmarking/utils0% | 0% | 0% | 38% | 61%
syne_tune/remote0% | 0% | 0% | 30% | 69%
benchmarking/definitions0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
tst/backend0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def scheduler_factory()
in benchmarking/cli/scheduler_factory.py
149 46 3
def on_trial_result()
in syne_tune/optimizer/schedulers/hyperband.py
100 35 3
def make_searcher_and_scheduler()
in benchmarking/cli/launch_utils.py
97 29 1
def _evaluate_soft_ranking()
in syne_tune/optimizer/schedulers/hyperband_pasha.py
46 24 3
def evolve()
in syne_tune/optimizer/schedulers/searchers/bore/de.py
48 24 2
def run()
in syne_tune/tuner.py
62 22 1
def __init__()
in syne_tune/optimizer/schedulers/hyperband.py
53 22 3
def convert_dataset()
in benchmarking/blackbox_repository/conversion_scripts/scripts/nasbench201_import.py
91 21 2
def __call__()
in syne_tune/stopping_criterion.py
31 21 2
def _prepare_data_internal()
in syne_tune/optimizer/schedulers/searchers/bayesopt/gpautograd/learncurve/issm.py
69 21 9
def next_candidates()
in syne_tune/optimizer/schedulers/searchers/bayesopt/tuning_algorithms/bo_algorithm.py
57 21 1
def _process_events_until_now()
in syne_tune/backend/simulator_backend/simulator_backend.py
49 17 1
def get()
in syne_tune/optimizer/schedulers/searchers/bayesopt/gpautograd/gluon.py
36 17 3
def issm_likelihood_computations()
in syne_tune/optimizer/schedulers/searchers/bayesopt/gpautograd/learncurve/issm.py
106 17 6
def _update_searcher()
in syne_tune/optimizer/schedulers/hyperband.py
28 16 5
def compute_acq_with_gradient()
in syne_tune/optimizer/schedulers/searchers/bayesopt/models/meanstd_acqfunc.py
47 16 3
def _create_common_objects()
in syne_tune/optimizer/schedulers/searchers/gp_searcher_factory.py
72 16 2
def _run_job_and_collect_results()
in benchmarking/blackbox_repository/tabulated_benchmark.py
35 15 3
def get_batch_configs()
in syne_tune/optimizer/schedulers/searchers/gp_fifo_searcher.py
65 15 4
def issm_likelihood_slow_computations()
in syne_tune/optimizer/schedulers/searchers/bayesopt/gpautograd/learncurve/issm.py
86 15 6