repack_model | R Documentation |
This function does the following: - uncompresses model tarball from S3 or local system into a temp folder - replaces the inference code from the model with the new code provided - compresses the new model tarball and saves it in S3 or local file system
repack_model( inference_script, source_directory, dependencies, model_uri, repacked_model_uri, sagemaker_session, kms_key = NULL )
inference_script |
(str): path or basename of the inference script that will be packed into the model |
source_directory |
(str): path including all the files that will be packed into the model |
dependencies |
(list[str]): A list of paths to directories (absolute or relative) with any additional libraries that will be exported to the |
model_uri |
(str): S3 or file system location of the original model tar |
repacked_model_uri |
(str): path or file system location where the new model will be saved |
sagemaker_session |
(sagemaker.session.Session): a sagemaker session to interact with S3. |
kms_key |
(str): KMS key ARN for encrypting the repacked model file |
str: path to the new packed model
Other sagemaker_utils:
.aws_partition()
,
.download_files_under_prefix()
,
base_from_name()
,
base_name_from_image()
,
build_dict()
,
common_variables
,
create_tar_file()
,
download_file()
,
download_folder()
,
get_config_value()
,
get_short_version()
,
name_from_base()
,
name_from_image()
,
regional_hostname()
,
retries()
,
sagemaker_short_timestamp()
,
sagemaker_timestamp()
,
secondary_training_status_changed()
,
secondary_training_status_message()
,
sts_regional_endpoint()
,
unique_name_from_base()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.