tensorflow / workshops
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 31 units with 370 lines of code in units (90.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (86 lines of code)
    • 4 medium size units (90 lines of code)
    • 7 small units (98 lines of code)
    • 19 very small units (96 lines of code)
0% | 23% | 24% | 26% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 23% | 24% | 26% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
notebooks0% | 23% | 24% | 26% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def plot_artifact_lineage()
in tfx_airflow/notebooks/utils.py
86 24 2
def display_tensorboard()
in tfx_airflow/notebooks/tfx_utils.py
25 6 3
def get_dest_artifact_of_type()
in tfx_airflow/notebooks/utils.py
22 7 3
22 3 4
def get_source_artifact_of_type()
in tfx_airflow/notebooks/utils.py
21 7 3
def display_artifact_and_execution_properties()
in tfx_airflow/notebooks/utils.py
18 3 3
def _add_parents()
in tfx_airflow/notebooks/utils.py
15 10 6
def compare_tfma_analysis()
in tfx_airflow/notebooks/tfx_utils.py
14 3 3
def get_df_from_artifacts_or_executions()
in tfx_airflow/notebooks/utils.py
14 5 2
def compare_stats_for_examples()
in tfx_airflow/notebooks/tfx_utils.py
13 3 5
def _add_node_attribute()
in tfx_airflow/notebooks/utils.py
13 4 5
def get_execution_for_output_artifact()
in tfx_airflow/notebooks/utils.py
11 4 3
def compare_examples_stats_for_models()
in tfx_airflow/notebooks/tfx_utils.py
10 3 3
def get_df_from_single_artifact_or_execution()
in tfx_airflow/notebooks/utils.py
10 4 2
def _get_value_str()
in tfx_airflow/notebooks/utils.py
8 4 1
def display_tfma_analysis()
in tfx_airflow/notebooks/tfx_utils.py
7 2 3
def display_stats_for_examples()
in tfx_airflow/notebooks/tfx_utils.py
7 2 2
def get_artifact_df()
in tfx_airflow/notebooks/utils.py
6 2 2
def get_execution_df()
in tfx_airflow/notebooks/utils.py
6 2 2
def display_examples_stats_for_model()
in tfx_airflow/notebooks/tfx_utils.py
5 2 2