ModelPackage: ModelPackage class

ModelPackageR Documentation

ModelPackage class

Description

A SageMaker “Model“ that can be deployed to an “Endpoint“.

Super classes

sagemaker.mlcore::ModelBase -> sagemaker.mlcore::Model -> ModelPackage

Methods

Public methods

Inherited methods

Method new()

Initialize a SageMaker ModelPackage.

Usage
ModelPackage$new(
  role,
  model_data = NULL,
  algorithm_arn = NULL,
  model_package_arn = NULL,
  ...
)
Arguments
role

(str): An AWS IAM role (either name or full ARN). The Amazon SageMaker training jobs and APIs that create Amazon SageMaker endpoints use this role to access training data and model artifacts. After the endpoint is created, the inference code might use the IAM role, if it needs to access an AWS resource.

model_data

(str): The S3 location of a SageMaker model data “.tar.gz“ file. Must be provided if algorithm_arn is provided.

algorithm_arn

(str): algorithm arn used to train the model, can be just the name if your account owns the algorithm. Must also provide “model_data“.

model_package_arn

(str): An existing SageMaker Model Package arn, can be just the name if your account owns the Model Package. “model_data“ is not required.

...

: Additional kwargs passed to the Model constructor.


Method enable_network_isolation()

Whether to enable network isolation when creating a model out of this ModelPackage

Usage
ModelPackage$enable_network_isolation()
Returns

bool: If network isolation should be enabled or not.


Method .create_sagemaker_model()

Create a SageMaker Model Entity

Usage
ModelPackage$.create_sagemaker_model(...)
Arguments
...

: Positional arguments coming from the caller. This class does not require any so they are ignored.


Method clone()

The objects of this class are cloneable with this method.

Usage
ModelPackage$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-mlcore documentation built on May 3, 2022, 10:08 a.m.