MODELCATALOG

Interview reference

Interview reference

V2 -> V3 mental mapping

Many examples and interviewers still use V2 terminology.

Inputs

lifecycle requirement / configuration

Outputs

configured SageMaker object or managed resource

Core explanation

I am comfortable translating older Estimator-based examples into the V3 training and serving abstractions.

01

Mental model

What this means before worrying about syntax.

Anchor on V3 ModelTrainer for training and ModelBuilder for serving, while recognizing older Estimator/model deployment patterns when you encounter them.

  • Concepts remain more stable than Python class names.
  • Translate older code by responsibility: training launcher, input config, model/serving builder, resource.
  • Use current V3 docs for exact syntax.
Lifecycle position
older Estimator-centric examples -> V3 ModelTrainer / ModelBuilder mental model
02

Implementation anatomy

The sequence you would actually build or configure.

  1. 1

    Read old example and identify lifecycle responsibility.

  2. 2

    Map training orchestration toward ModelTrainer.

  3. 3

    Map serving construction toward ModelBuilder where applicable.

  4. 4

    Keep low-level resource/API concepts when still relevant.

Objects / terms worth remembering
Estimator (V2 context)ModelTrainerModelBuilder
03

Concrete example

A real model-development or production flow.

1

Old: Estimator(...).fit({train: s3_uri})

↓
2

Concepts: image/framework + compute + hyperparameters + named data + launch

↓
3

V3 mental translation: ModelTrainer configuration + InputData/channel configuration + train()

04

Implementation lab

Concrete code, data manipulation and configuration for this lifecycle step.

01

Translate by responsibility, not syntax

python
# Older mental model:
# Estimator(...) -> fit({"train": s3_uri})

# V3 mental model:
from sagemaker.train import ModelTrainer
from sagemaker.train.configs import InputData

trainer = ModelTrainer(
    training_image=TRAINING_IMAGE_URI,
    role=SAGEMAKER_ROLE_ARN,
)

trainer.train(input_data_config=[
    InputData(
        channel_name="train",
        data_source=TRAIN_S3_URI,
    )
])
02

Serving-side mental translation

python
# V3:
from sagemaker.serve.model_builder import ModelBuilder

builder = ModelBuilder(
    model=trained_resource_or_package,
    role_arn=SAGEMAKER_ROLE_ARN,
    instance_type="ml.m5.xlarge",
)

builder.build()
endpoint = builder.deploy(
    endpoint_name="complaint-classifier-prod"
)

Design decisions that matter

  • Do not rewrite stable V2 production code without a migration reason.
  • For new learning/code, prefer current V3 surfaces.

Common failure modes

  • Exact arguments differ; conceptual mapping is safer than search/replace.
  • Many online examples still target V2.

Production readiness check

Items to close before treating this step as production-ready.

✓ responsibility identified✓ current import path✓ signature verified✓ migration reason✓ behavior parity