-
Notifications
You must be signed in to change notification settings - Fork 1.2k
How pass a name to models saved with sagemaker.sklearn.estimator.SKLearn #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, Just to clarify, your model file name should be determined from the entry point script (like so: https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-python-sdk/scikit_learn_iris/scikit_learn_iris.py#L60), but the job name should be created from the base_job_name. The code for this can be seen within the SDK: Estimator _prepare_for_training: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/estimator.py#L175 SKLearn estimator: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/sklearn/estimator.py (method not overriden) Is the job name correct? |
Sorry, not sure if I made it clear that I have 2 scripts. The first launches the training job and saves the model (shown above). The other then looks up the training job name and deploys the endpoint:
The My training job name does get named properly as When I deploy the model with the 2nd script, the SageMaker model name is then named as |
I've found that if I combine my 2 scripts to train and deploy, I don't have this problem:
I haven't tested further yet, but seems the model name is not getting attached and passed through properly. |
Hello It looks like the problem is due to the Model creation setting the name as the I will be driving a fix from the SDK side to fix this usecase. Thank you for your patience. |
Hello, the fix was pushed into master; you should be able to attach the correct name now. https://github.com/aws/sagemaker-python-sdk/pull/808/files |
Please fill out the form below.
System Information
Describe the problem
I am creating an SKLearn estimator and specifying a
base_job_name
, but my saved models are being saved assagemaker-scikit-learn-timestamp
.An example saved model that is saved from this training job is then
sagemaker-scikit-learn-2019-05-08-12-50-06-661
.The text was updated successfully, but these errors were encountered: