tensorflow / hub
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 334 units with 3,119 lines of code in units (80.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 18 medium complex units (666 lines of code)
    • 31 simple units (674 lines of code)
    • 285 very simple units (1,779 lines of code)
0% | 0% | 21% | 21% | 57%
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% | 21% | 21% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_hub0% | 0% | 20% | 19% | 59%
tensorflow_hub/tools/module_search0% | 0% | 48% | 34% | 16%
tensorflow_hub/tools/make_nearest_neighbour_index0% | 0% | 17% | 34% | 48%
tensorflow_hub/tools/make_image_classifier0% | 0% | 12% | 18% | 68%
build_docs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def atomic_download()
in tensorflow_hub/resolver.py
58 24 4
def knn_errorrate()
in tensorflow_hub/tools/module_search/utils.py
52 24 4
def validate_args()
in tensorflow_hub/tools/make_nearest_neighbour_index/make_nearest_neighbour_index.py
43 18 1
def main()
in tensorflow_hub/tools/make_image_classifier/make_image_classifier.py
37 17 1
def create_apply_graph()
in tensorflow_hub/native_module.py
57 17 4
def _check_module_is_image_embedding()
in tensorflow_hub/feature_column.py
26 16 2
def recover_partitioned_variable_map()
in tensorflow_hub/native_module.py
33 16 1
def __init__()
in tensorflow_hub/keras_layer.py
38 14 12
def _apply_colocation_attr_map()
in tensorflow_hub/native_module.py
42 14 2
def _make_assets_key_collection()
in tensorflow_hub/saved_model_lib.py
51 14 2
def get_config()
in tensorflow_hub/keras_layer.py
33 13 1
def _check_trainability()
in tensorflow_hub/keras_layer.py
15 12 1
def _setup_layer()
in tensorflow_hub/keras_layer.py
19 11 3
def call()
in tensorflow_hub/keras_layer.py
31 11 3
def _check_module_is_text_embedding()
in tensorflow_hub/feature_column.py
24 11 1
def get_expected_image_size()
in tensorflow_hub/image_util.py
24 11 3
def main()
in tensorflow_hub/tools/module_search/search.py
42 11 1
def eval_function_for_module()
in tensorflow_hub/module.py
41 11 2
def replace_apply_state()
in tensorflow_hub/native_module.py
12 10 3
def find_signature_inputs_from_multivalued_ops()
in tensorflow_hub/native_module.py
22 10 1