aws / sagemaker-python-sdk
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 1,723 units with 15,753 lines of code in units (54.2% of code).
    • 0 very long units (0 lines of code)
    • 11 long units (629 lines of code)
    • 137 medium size units (3,893 lines of code)
    • 365 small units (5,269 lines of code)
    • 1,210 very small units (5,962 lines of code)
0% | 3% | 24% | 33% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 3% | 24% | 33% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/sagemaker0% | 3% | 26% | 35% | 34%
src/sagemaker/workflow0% | 10% | 25% | 24% | 40%
src/sagemaker/model_monitor0% | 8% | 28% | 35% | 26%
src/sagemaker/local0% | 5% | 33% | 21% | 39%
src/sagemaker/spark0% | 12% | 22% | 52% | 12%
src/sagemaker/amazon0% | 0% | 19% | 35% | 45%
src/sagemaker/automl0% | 0% | 41% | 28% | 30%
src/sagemaker/cli0% | 0% | 12% | 24% | 63%
src/sagemaker/lineage0% | 0% | 12% | 35% | 52%
src/sagemaker/huggingface0% | 0% | 38% | 50% | 10%
src/sagemaker/tensorflow0% | 0% | 28% | 34% | 36%
src/sagemaker/feature_store0% | 0% | 22% | 32% | 44%
src/sagemaker/mxnet0% | 0% | 32% | 41% | 25%
ci-scripts0% | 0% | 37% | 27% | 34%
src/sagemaker/chainer0% | 0% | 28% | 48% | 22%
src/sagemaker/rl0% | 0% | 22% | 32% | 44%
src/sagemaker/debugger0% | 0% | 7% | 34% | 58%
src/sagemaker/pytorch0% | 0% | 16% | 48% | 34%
src/sagemaker/sklearn0% | 0% | 19% | 52% | 28%
src/sagemaker/xgboost0% | 0% | 0% | 67% | 32%
src/sagemaker/apiutils0% | 0% | 0% | 27% | 72%
src/sagemaker/wrangler0% | 0% | 0% | 25% | 74%
src/sagemaker/async_inference0% | 0% | 0% | 36% | 63%
src/sagemaker/dataset_definition0% | 0% | 0% | 30% | 69%
src/sagemaker/training_compiler0% | 0% | 0% | 0% | 100%
src/sagemaker/serverless0% | 0% | 0% | 0% | 100%
src/sagemaker/sparkml0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _generate_model_monitor()
in src/sagemaker/workflow/check_job_config.py
68 5 2
def attach()
in src/sagemaker/model_monitor/model_monitoring.py
66 5 3
def _get_train_args()
in src/sagemaker/estimator.py
59 19 4
def attach()
in src/sagemaker/model_monitor/model_monitoring.py
59 7 3
56 17 3
def start()
in src/sagemaker/local/entities.py
55 16 5
def get_caller_identity_arn()
in src/sagemaker/session.py
55 6 1
def arguments()
in src/sagemaker/workflow/_utils.py
55 10 1
def _stage_submit_deps()
in src/sagemaker/spark/processing.py
54 13 3
def validate_mp_config()
in src/sagemaker/fw_utils.py
51 27 1
def training_base_config()
in src/sagemaker/workflow/airflow.py
51 16 4
def _generate_baseline_job_inputs()
in src/sagemaker/workflow/quality_check_step.py
50 3 1
def _attach()
in src/sagemaker/model_monitor/model_monitoring.py
49 5 5
def __init__()
in src/sagemaker/amazon/linear_learner.py
48 1 0
def train()
in src/sagemaker/local/image.py
45 8 5
def _get_tuner_args()
in src/sagemaker/tuner.py
44 8 3
def retrieve_artifacts()
in src/sagemaker/local/image.py
43 13 4
def attach()
in src/sagemaker/automl/automl.py
43 2 3
43 5 4
def _load_config()
in src/sagemaker/job.py
42 7 4