tensorflow / tfx-addons
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 56 units with 571 lines of code in units (28.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (82 lines of code)
    • 5 medium size units (167 lines of code)
    • 8 small units (112 lines of code)
    • 42 very small units (210 lines of code)
0% | 14% | 29% | 19% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 29% | 19% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tfx_addons/sampling/example0% | 42% | 24% | 6% | 26%
tfx_addons/sampling0% | 0% | 49% | 21% | 29%
tfx_addons/feature_selection0% | 0% | 57% | 16% | 26%
tfx_addons/xgboost_evaluator0% | 0% | 26% | 21% | 52%
tfx_addons/schema_curation/example0% | 0% | 0% | 80% | 20%
ROOT0% | 0% | 0% | 100% | 0%
tfx_addons/schema_curation/component0% | 0% | 0% | 72% | 27%
tfx_addons/mlmd_client0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _create_pipeline()
in tfx_addons/sampling/example/sampler_pipeline_local.py
82 3 7
def trainer_fn()
in tfx_addons/sampling/example/sampler_utils.py
46 5 2
def FeatureSelection()
in tfx_addons/feature_selection/component.py
43 12 4
def sample_examples()
in tfx_addons/sampling/executor.py
29 6 3
def __init__()
in tfx_addons/sampling/component.py
25 2 10
def setup()
in tfx_addons/xgboost_evaluator/xgboost_predict_extractor.py
24 10 1
def process()
in tfx_addons/xgboost_evaluator/xgboost_predict_extractor.py
20 10 2
def _create_pipeline()
in tfx_addons/schema_curation/example/taxi_example_local.py
16 4 4
14 1 0
def __init__()
in tfx_addons/schema_curation/component/component.py
13 1 8
def _eval_input_receiver_fn()
in tfx_addons/sampling/example/sampler_utils.py
13 1 2
def _get_data_from_tfrecords()
in tfx_addons/feature_selection/component.py
12 3 1
def _generate_elements()
in tfx_addons/sampling/executor.py
12 4 2
def sample_data()
in tfx_addons/sampling/executor.py
12 4 4
def custom_eval_shared_model()
in tfx_addons/xgboost_evaluator/xgboost_predict_extractor.py
10 1 4
def _build_estimator()
in tfx_addons/sampling/example/sampler_utils.py
10 3 3
def _example_serving_receiver_fn()
in tfx_addons/sampling/example/sampler_utils.py
10 1 2
def _input_fn()
in tfx_addons/sampling/example/sampler_utils.py
9 1 4
def filter_null()
in tfx_addons/sampling/executor.py
9 6 3
def write_tfexamples()
in tfx_addons/sampling/executor.py
9 1 3