@@ -34,13 +34,15 @@ Table of Contents
34
34
6. `PyTorch SageMaker Estimators <#pytorch-sagemaker-estimators >`__
35
35
7. `SageMaker SparkML Serving <#sagemaker-sparkml-serving >`__
36
36
8. `AWS SageMaker Estimators <#aws-sagemaker-estimators >`__
37
- 9. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators >`__
38
- 10. `SageMaker Automatic Model Tuning <#sagemaker-automatic-model-tuning >`__
39
- 11. `SageMaker Batch Transform <#sagemaker-batch-transform >`__
40
- 12. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc >`__
41
- 13. `BYO Model <#byo-model >`__
42
- 14. `Inference Pipelines <#inference-pipelines >`__
43
- 15. `SageMaker Workflow <#sagemaker-workflow >`__
37
+ 9. `Using SageMaker AlgorithmEstimators <#using-sagemaker-algorithmestimators >`__
38
+ 10. `Consuming SageMaker Model Packages <#consuming-sagemaker-model-packages >`__
39
+ 11. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators >`__
40
+ 12. `SageMaker Automatic Model Tuning <#sagemaker-automatic-model-tuning >`__
41
+ 13. `SageMaker Batch Transform <#sagemaker-batch-transform >`__
42
+ 14. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc >`__
43
+ 15. `BYO Model <#byo-model >`__
44
+ 16. `Inference Pipelines <#inference-pipelines >`__
45
+ 17. `SageMaker Workflow <#sagemaker-workflow >`__
44
46
45
47
46
48
Installing the SageMaker Python SDK
@@ -456,6 +458,59 @@ For more information, see `AWS SageMaker Estimators and Models`_.
456
458
457
459
.. _AWS SageMaker Estimators and Models: src/ sagemaker/ amazon/ README .rst
458
460
461
+ Using SageMaker AlgorithmEstimators
462
+ ---------------------------------- -
463
+
464
+ With the SageMaker Algorithm entities, you can create training jobs with just an `` algorithm_arn`` instead of
465
+ a training image. There is a dedicated `` AlgorithmEstimator`` class that accepts `` algorithm_arn`` as a
466
+ parameter, the rest of the arguments are similar to the other Estimator classes. This class also allows you to
467
+ consume algorithms that you have subscribed to in the AWS Marketplace. The AlgorithmEstimator performs
468
+ client- side validation on your inputs based on the algorithm' s properties.
469
+
470
+ Here is an example:
471
+
472
+ .. code:: python
473
+
474
+ import sagemaker
475
+
476
+ algo = sagemaker.AlgorithmEstimator(
477
+ algorithm_arn = ' arn:aws:sagemaker:us-west-2:1234567:algorithm/some-algorithm' ,
478
+ role = ' SageMakerRole' ,
479
+ train_instance_count = 1 ,
480
+ train_instance_type = ' ml.c4.xlarge' )
481
+
482
+ train_input = algo.sagemaker_session.upload_data(path = ' /path/to/your/data' )
483
+
484
+ algo.fit({' training' : train_input})
485
+ algo.deploy(1 , ' ml.m4.xlarge' )
486
+
487
+ # When you are done using your endpoint
488
+ algo.delete_endpoint()
489
+
490
+
491
+ Consuming SageMaker Model Packages
492
+ ----------------------------------
493
+
494
+ SageMaker Model Packages are a way to specify and share information for how to create SageMaker Models.
495
+ With a SageMaker Model Package that you have created or subscribed to in the AWS Marketplace,
496
+ you can use the specified serving image and model data for Endpoints and Batch Transform jobs.
497
+
498
+ To work with a SageMaker Model Package, use the `` ModelPackage`` class .
499
+
500
+ Here is an example:
501
+
502
+ .. code:: python
503
+
504
+ import sagemaker
505
+
506
+ model = sagemaker.ModelPackage(
507
+ role = ' SageMakerRole' ,
508
+ model_package_arn = ' arn:aws:sagemaker:us-west-2:123456:model-package/my-model-package' )
509
+ model.deploy(1 , ' ml.m4.xlarge' , endpoint_name = ' my-endpoint' )
510
+
511
+ # When you are done using your endpoint
512
+ model.sagemaker_session.delete_endpoint(' my-endpoint' )
513
+
459
514
460
515
BYO Docker Containers with SageMaker Estimators
461
516
---------------------------------------------- -
@@ -470,7 +525,7 @@ Please refer to the full example in the examples repo:
470
525
git clone https:// github.com/ awslabs/ amazon- sagemaker- examples.git
471
526
472
527
473
- The example notebook is is located here:
528
+ The example notebook is located here:
474
529
`` advanced_functionality/ scikit_bring_your_own/ scikit_bring_your_own.ipynb``
475
530
476
531
0 commit comments