Training and deploying a PyTorch model with the SageMaker Python SDK
Performing the training and deployment of a custom PyTorch model with SageMaker is fairly straightforward. Step 1 involves creating the entrypoint
script where our custom neural network and training logic are defined and coded. Step 2 involves creating the inference entrypoint
script, which helps us load the trained model. Step 3 involves using these scripts as arguments when initializing the PyTorch
and PyTorchModel
objects respectively.
In this recipe, we will focus on step 3 and proceed with the training and deployment of our custom PyTorch neural network model in SageMaker. If you are looking for step 1, feel free to check the recipe Preparing the entrypoint PyTorch training script. If you are looking for step 2 instead, please check the recipe Preparing the entrypoint PyTorch inference script.
Getting ready
This recipe continues from Preparing the entrypoint PyTorch inference script.