Closed ehrene closed 3 years ago
Appears that RealTimePredictor
has been renamed to simply Predictor
.
Found that dict()
syntax as shown in this example is valid, using =
rather than :
for assigning keys: https://docs.python.org/3/tutorial/datastructures.html#dictionaries Did a quick test on my own and found that both approaches do produce a valid dict
.
on the page https://course.fast.ai/deployment_amzn_sagemaker.html# there are missing instructions.
ImagePredictor
is not clear and will not build the class as written.An exception is thrown that says
NameError: name 'RealTimePredictor' is not defined
I believe the import statement needed here is related to the sagemaker SDK and should be:
a comment or two on this would be super helpful for those new to SageMaker's SDK. Many of these classes/methods in the sagemaker SDK are not intuitive and require poking around the docs a lot. here's a link to where the object call is referenced: https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html
predict_fn
are not correctly stated for a dict object to be returned.class
is a reserved word in python and therefore cannot be used as stated, but more importantly the formatting for creating dict objects is'key0': value, 'key1': value, etc. etc.
. The below is incorrect and the keys need to be strings and the=
needs to be a colon, i believe.Corrected may look like
framework_version
parameter in thePyTorchModel()
creation step that at least identifies the latest or references when this was created. Not a big deal, but it's not clear if it is a sagemaker thing or maybe a PyTorch thing (i'm new to PyTorch)