tensorflow / transform
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 846 units with 9,355 lines of code in units (76.9% of code).
    • 2 very long units (223 lines of code)
    • 14 long units (947 lines of code)
    • 109 medium size units (3,327 lines of code)
    • 167 small units (2,461 lines of code)
    • 554 very small units (2,397 lines of code)
2% | 10% | 35% | 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
py2% | 10% | 35% | 26% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tensorflow_transform/saved26% | 0% | 31% | 18% | 23%
tensorflow_transform/beam4% | 13% | 26% | 25% | 30%
tensorflow_transform0% | 9% | 38% | 28% | 23%
tensorflow_transform/coders0% | 21% | 29% | 18% | 30%
tensorflow_transform/tf_metadata0% | 11% | 44% | 24% | 20%
tensorflow_transform/experimental0% | 0% | 71% | 0% | 28%
tensorflow_transform/beam/tft_beam_io0% | 0% | 32% | 29% | 37%
tensorflow_transform/py_func0% | 0% | 53% | 21% | 25%
ROOT0% | 0% | 0% | 65% | 34%
tensorflow_transform/beam/experimental0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _partially_apply_saved_transform_impl()
in tensorflow_transform/saved/saved_transform_io.py
114 26 3
def expand()
in tensorflow_transform/beam/impl.py
109 11 2
def assertAnalyzeAndTransformResults()
in tensorflow_transform/beam/tft_unit.py
99 7 13
def vocabulary()
in tensorflow_transform/analyzers.py
89 26 16
def build()
in tensorflow_transform/beam/analysis_graph_builder.py
87 8 5
def apply_saved_model()
in tensorflow_transform/pretrained_models.py
75 16 5
def expand()
in tensorflow_transform/beam/impl.py
73 7 2
def compute_tukey_hh_params()
in tensorflow_transform/gaussianization.py
71 28 1
def apply_vocabulary()
in tensorflow_transform/mappers.py
65 15 10
def apply_buckets_with_interpolation()
in tensorflow_transform/mappers.py
65 11 3
def __init__()
in tensorflow_transform/coders/csv_coder.py
60 13 7
def reduce_batch_weighted_cooccurrences()
in tensorflow_transform/tf_utils.py
58 7 5
def _compute_analysis_results_for_func_attributes()
in tensorflow_transform/graph_tools.py
52 16 3
def _calculate_mutual_information_for_feature_value()
in tensorflow_transform/beam/analyzer_impls.py
51 14 4
def assertAnalyzerOutputs()
in tensorflow_transform/beam/tft_unit.py
51 10 10
def _sparse_feature_as_feature_spec()
in tensorflow_transform/tf_metadata/schema_utils.py
51 12 3
def ngrams()
in tensorflow_transform/mappers.py
49 13 5
def _ApplyThresholdsAndTopK()
in tensorflow_transform/beam/analyzer_impls.py
49 15 5
def __init__()
in tensorflow_transform/coders/example_proto_coder.py
48 6 3
def _scale_to_z_score_internal()
in tensorflow_transform/mappers.py
46 13 5