aws / amazon-sagemaker-examples

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.
https://sagemaker-examples.readthedocs.io
Apache License 2.0
10.08k stars 6.76k forks source link

[Bug Report] Cannot run the examples on Amazon SageMaker Studio #2152

Closed zlufy90 closed 3 years ago

zlufy90 commented 3 years ago

I tried running several examples on Amazon SageMaker Studio. However, all of examples I run have errors. I have to stop at some step. I guess the example is not up-to-date

hongshanli23 commented 3 years ago

Hi @zlufy90 , do you have links to those examples?

aaronmarkham commented 3 years ago

As a general rule, BYOC notebooks will not work with Studio.

Here are some notebooks that work with Studio: https://sagemaker-examples.readthedocs.io/en/latest/aws_sagemaker_studio/index.html

zlufy90 commented 3 years ago

Hello @hsl89

Hi @zlufy90 , do you have links to those examples?

Yes, the example: https://github.com/aws/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/scikit_learn_randomforest.

Error:

train_instance_type has been renamed in sagemaker>=2.
See: https://sagemaker.readthedocs.io/en/stable/v2.html for details.
train_instance_count has been renamed in sagemaker>=2.
See: https://sagemaker.readthedocs.io/en/stable/v2.html for details.
train_instance_count has been renamed in sagemaker>=2.
See: https://sagemaker.readthedocs.io/en/stable/v2.html for details.
train_instance_type has been renamed in sagemaker>=2.
See: https://sagemaker.readthedocs.io/en/stable/v2.html for details.

I run directly on SageMaker Studio.

One other thing, In this example, https://github.com/aws/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/scikit_learn_iris When I used scikit_learn to predict Iris on my local PC, The predict result is label name ('Iris-setosa', 'Iris-versicolor', 'Iris-virginica'). However, when I run on Sage maker studio, the predict result is number (0.0, 1.0, 2.0). Is there anyway to map between these number to the label name?

zlufy90 commented 3 years ago

Hello @aaronmarkham, At this time, I have not fully understood about SageMaker Studio architect. I just followed the instruction to work with SageMaker Studio. Everything is by default or set by following the instruction from AWS