How To Create A Pipeline In Sagemaker With Pytorch
Solution 1:
First, checkout the mnist example here:
With script mode, you can run the code (in mnist.py) using the below estimator.
from sagemaker.pytorch importPyTorchestimator= PyTorch(entry_point='mnist.py',
role=role,
framework_version='1.1.0',
train_instance_count=2,
train_instance_type='ml.c4.xlarge',
hyperparameters={
'epochs': 6,
'backend': 'gloo'
})
Simply update the mnist.py script as per tfidf pipeline. Hope this helps.
Solution 2:
Apparently, We need to use inference pipelines.
An inference pipeline is an Amazon SageMaker model that is composed of a linear sequence of two to five containers that process requests for inferences on data. You use an inference pipeline to define and deploy any combination of pretrained Amazon SageMaker built-in algorithms and your own custom algorithms packaged in Docker containers. You can use an inference pipeline to combine preprocessing, predictions, and post-processing data science tasks. Inference pipelines are fully managed.
one can read the docs here -
https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipelines.html
Example -
Post a Comment for "How To Create A Pipeline In Sagemaker With Pytorch"