A permitting office is training a zoning-classification model and chooses to write a custom PyTorch training script run through SageMaker script mode instead of using a SageMaker built-in algorithm. The model needs a nonstandard architecture with a custom loss function tailored to how zoning violations are weighted. Which factor best justifies this choice?
Select an answer to reveal the explanation.
Short Explanation
Think of a built-in algorithm like a meal kit with a fixed recipe, while script mode is bringing your own recipe into the same rented kitchen. When a nonstandard architecture and a custom loss function don't fit any fixed recipe, script mode is what lets the team run their own PyTorch code while still getting SageMaker's managed training infrastructure underneath it.
Full Explanation
SageMaker script mode allows a team to bring a custom training script, built with a framework like PyTorch, that defines its own model architecture, loss function, and training loop, while still running on SageMaker's managed training infrastructure for provisioning, scaling, and job orchestration. This fits the permitting office's need precisely: a nonstandard architecture and a custom loss weighting scheme cannot be expressed through a built-in algorithm's fixed set of configurable hyperparameters, so custom code is required, but there is no need to give up SageMaker's managed infrastructure to get it. The option claiming built-in algorithms cannot run inside SageMaker at all is false on its face, since built-in algorithms are a core SageMaker offering; the real distinction is that they expose a fixed structure rather than arbitrary custom code. The option restricting script mode to inference only ignores that script mode is specifically a training-time mechanism for supplying custom training logic, not a deployment-only feature. The option claiming script mode requires abandoning managed infrastructure for self-managed EC2 misunderstands the value proposition entirely; the whole point of script mode is combining custom code with managed infrastructure, not trading one for the other. Scope note: script mode does add operational responsibility for the training code itself, including dependency management and script correctness, that a built-in algorithm would otherwise handle. Operational check: confirm the custom script's loss function actually reflects the zoning-violation weighting scheme by inspecting training logs for the expected loss behavior on a known validation batch.