tensorflow / cloud
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 175 units with 2,419 lines of code in units (58.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (575 lines of code)
    • 15 simple units (390 lines of code)
    • 149 very simple units (1,454 lines of code)
0% | 0% | 23% | 16% | 60%
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% | 26% | 15% | 58%
cc0% | 0% | 0% | 24% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/python/tensorflow_cloud/tuner0% | 0% | 44% | 16% | 38%
src/python/tensorflow_cloud/core0% | 0% | 11% | 16% | 72%
src/python/tensorflow_cloud/utils0% | 0% | 15% | 15% | 69%
src/cpp/monitoring0% | 0% | 0% | 24% | 75%
src/python/tensorflow_cloud/core/experimental0% | 0% | 0% | 6% | 93%
src/python0% | 0% | 0% | 0% | 100%
api_docs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def convert_study_config_to_hps()
in src/python/tensorflow_cloud/tuner/utils.py
89 22 2
def run_trial()
in src/python/tensorflow_cloud/tuner/tuner.py
99 19 4
def _is_parameter_valid()
in src/python/tensorflow_cloud/tuner/utils.py
56 17 2
def _convert_hyperparams_to_vizier_params()
in src/python/tensorflow_cloud/tuner/utils.py
56 15 1
def _get_docker_base_image()
in src/python/tensorflow_cloud/core/containerize.py
34 14 1
def validate_job_labels()
in src/python/tensorflow_cloud/core/gcp.py
58 12 1
def _serialize_assets()
in src/python/tensorflow_cloud/tuner/cloud_fit_client.py
43 12 3
def convert_hyperparams_to_hparams()
in src/python/tensorflow_cloud/tuner/utils.py
40 12 1
def update_trial()
in src/python/tensorflow_cloud/tuner/tuner.py
44 12 6
def get_or_set_consent_status()
in src/python/tensorflow_cloud/utils/google_api_client.py
18 11 0
def create_trial()
in src/python/tensorflow_cloud/tuner/tuner.py
38 11 2
def _create_docker_file()
in src/python/tensorflow_cloud/core/containerize.py
43 9 1
def run_cloudtuner()
in src/python/tensorflow_cloud/core/run.py
36 9 2
def _validate_files()
in src/python/tensorflow_cloud/core/validate.py
25 8 2
def _get_file_path_map()
in src/python/tensorflow_cloud/core/containerize.py
23 8 1
def format_objective()
in src/python/tensorflow_cloud/tuner/utils.py
27 8 5
def get_distribution_strategy_str()
in src/python/tensorflow_cloud/core/experimental/models.py
12 7 1
def end_trial()
in src/python/tensorflow_cloud/tuner/tuner.py
35 7 3
def __init__()
in src/python/tensorflow_cloud/tuner/tuner.py
46 7 18
def _get_remote_training_metrics()
in src/python/tensorflow_cloud/tuner/tuner.py
23 7 5