tensorflow / model-card-toolkit
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 67 units with 788 lines of code in units (40.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (139 lines of code)
    • 12 simple units (271 lines of code)
    • 51 very simple units (378 lines of code)
0% | 0% | 17% | 34% | 47%
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% | 17% | 34% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
model_card_toolkit/utils0% | 0% | 33% | 26% | 40%
model_card_toolkit0% | 0% | 0% | 57% | 42%
ROOT0% | 0% | 0% | 60% | 40%
model_card_toolkit/tfx0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _update_from_v1_to_v2()
in model_card_toolkit/utils/json_util.py
48 23 2
def _extract_graph_data_from_dataset_feature_statistics()
in model_card_toolkit/utils/graphics.py
34 16 2
def annotate_eval_result_metrics()
in model_card_toolkit/utils/tfx_util.py
32 12 2
def annotate_eval_result_plots()
in model_card_toolkit/utils/graphics.py
25 12 2
def _annotate_eval_results()
in model_card_toolkit/model_card_toolkit.py
25 10 2
def filter_metrics()
in model_card_toolkit/utils/tfx_util.py
33 10 3
def _draw_histogram()
in model_card_toolkit/utils/graphics.py
25 10 1
def _from_proto()
in model_card_toolkit/base_model_card_field.py
24 10 2
def _from_json()
in model_card_toolkit/base_model_card_field.py
24 9 4
def _annotate_dataset_statistics()
in model_card_toolkit/model_card_toolkit.py
19 8 2
def __post_init__()
in model_card_toolkit/utils/source.py
16 8 1
def __post_init__()
in model_card_toolkit/utils/source.py
16 8 1
def to_proto()
in model_card_toolkit/base_model_card_field.py
21 8 1
12 6 1
def export_format()
in model_card_toolkit/model_card_toolkit.py
33 6 5
def annotate_dataset_feature_statistics_plots()
in model_card_toolkit/utils/graphics.py
23 6 2
def __post_init__()
in model_card_toolkit/utils/source.py
10 5 1
def _get_tfx_pipeline_types()
in model_card_toolkit/utils/tfx_util.py
21 5 1
def _property_value()
in model_card_toolkit/utils/tfx_util.py
13 5 5
def stringify_slice_key()
in model_card_toolkit/utils/graphics.py
12 5 1