facebookresearch / hydra
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 678 units with 5,202 lines of code in units (43.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 19 medium complex units (934 lines of code)
    • 34 simple units (757 lines of code)
    • 625 very simple units (3,511 lines of code)
0% | 0% | 17% | 14% | 67%
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% | 18% | 14% | 67%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
hydra/_internal0% | 0% | 14% | 19% | 65%
tools/configen0% | 0% | 68% | 0% | 31%
plugins/hydra_optuna_sweeper0% | 0% | 77% | 0% | 22%
hydra/plugins0% | 0% | 44% | 13% | 41%
plugins/hydra_nevergrad_sweeper0% | 0% | 55% | 17% | 26%
hydra/core0% | 0% | 4% | 13% | 81%
plugins/hydra_ray_launcher0% | 0% | 23% | 0% | 76%
tools/release0% | 0% | 28% | 0% | 71%
ROOT0% | 0% | 0% | 34% | 65%
plugins/hydra_ax_sweeper0% | 0% | 0% | 47% | 52%
hydra0% | 0% | 0% | 0% | 100%
build_helpers0% | 0% | 0% | 0% | 100%
website/src0% | 0% | 0% | 0% | 100%
hydra/experimental0% | 0% | 0% | 0% | 100%
hydra/extra0% | 0% | 0% | 0% | 100%
tools/ci0% | 0% | 0% | 0% | 100%
plugins/hydra_joblib_launcher0% | 0% | 0% | 0% | 100%
plugins/hydra_submitit_launcher0% | 0% | 0% | 0% | 100%
plugins/hydra_rq_launcher0% | 0% | 0% | 0% | 100%
plugins/hydra_colorlog0% | 0% | 0% | 0% | 100%
website0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def sweep()
in plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/_impl.py
109 24 2
def _get_matches()
in hydra/plugins/completion_plugin.py
54 20 2
def sweep()
in plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/_impl.py
73 19 2
def _query_config_groups()
in hydra/plugins/completion_plugin.py
46 19 2
def generate_module()
in tools/configen/configen/configen.py
69 18 2
def is_incompatible()
in tools/configen/configen/configen.py
35 16 1
def run_and_report()
in hydra/_internal/utils.py
71 16 1
def _locate()
in hydra/_internal/utils.py
41 15 1
def type_str()
in tools/configen/configen/utils.py
37 14 1
def _apply_overrides_to_config()
in hydra/_internal/config_loader_impl.py
54 14 2
def visitOverride()
in hydra/core/override_parser/overrides_visitor.py
56 14 2
def create_optuna_distribution_from_override()
in plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/_impl.py
40 13 1
def __init__()
in hydra/_internal/defaults_list.py
45 12 3
def _query()
in hydra/plugins/completion_plugin.py
30 12 3
def main()
in tools/release/release.py
36 11 1
def convert_imports()
in tools/configen/configen/utils.py
25 11 2
def set_up_machine()
in plugins/hydra_ray_launcher/integration_test_tools/create_integration_test_ami.py
56 11 1
def find_match()
in hydra/_internal/config_search_path_impl.py
21 11 3
def eval()
in hydra/_internal/grammar/functions.py
36 11 2
def sweep()
in plugins/hydra_ax_sweeper/hydra_plugins/hydra_ax_sweeper/_core.py
48 10 2