repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
aws/sagemaker-python-sdk
src/sagemaker/rl/estimator.py
RLEstimator._prepare_init_params_from_job_description
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
python
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
[ "def", "_prepare_init_params_from_job_description", "(", "cls", ",", "job_details", ",", "model_channel_name", "=", "None", ")", ":", "init_params", "=", "super", "(", "RLEstimator", ",", "cls", ")", ".", "_prepare_init_params_from_job_description", "(", "job_details", ...
Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_name (str): Name of the channel where pre-trained model data will be downloaded. ...
[ "Convert", "the", "job", "description", "to", "init", "params", "that", "can", "be", "handled", "by", "the", "class", "constructor" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/rl/estimator.py#L240-L276
train
Convert the job description to init params that can be handled by the class constructor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/rl/estimator.py
RLEstimator.hyperparameters
def hyperparameters(self): """Return hyperparameters used by your custom TensorFlow code during model training.""" hyperparameters = super(RLEstimator, self).hyperparameters() additional_hyperparameters = {SAGEMAKER_OUTPUT_LOCATION: self.output_path, # TODO...
python
def hyperparameters(self): """Return hyperparameters used by your custom TensorFlow code during model training.""" hyperparameters = super(RLEstimator, self).hyperparameters() additional_hyperparameters = {SAGEMAKER_OUTPUT_LOCATION: self.output_path, # TODO...
[ "def", "hyperparameters", "(", "self", ")", ":", "hyperparameters", "=", "super", "(", "RLEstimator", ",", "self", ")", ".", "hyperparameters", "(", ")", "additional_hyperparameters", "=", "{", "SAGEMAKER_OUTPUT_LOCATION", ":", "self", ".", "output_path", ",", "...
Return hyperparameters used by your custom TensorFlow code during model training.
[ "Return", "hyperparameters", "used", "by", "your", "custom", "TensorFlow", "code", "during", "model", "training", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/rl/estimator.py#L278-L287
train
Return hyperparameters used by your custom TensorFlow code during model training.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/rl/estimator.py
RLEstimator.default_metric_definitions
def default_metric_definitions(cls, toolkit): """Provides default metric definitions based on provided toolkit. Args: toolkit(sagemaker.rl.RLToolkit): RL Toolkit to be used for training. Returns: list: metric definitions """ if toolkit is RLToolkit.COACH...
python
def default_metric_definitions(cls, toolkit): """Provides default metric definitions based on provided toolkit. Args: toolkit(sagemaker.rl.RLToolkit): RL Toolkit to be used for training. Returns: list: metric definitions """ if toolkit is RLToolkit.COACH...
[ "def", "default_metric_definitions", "(", "cls", ",", "toolkit", ")", ":", "if", "toolkit", "is", "RLToolkit", ".", "COACH", ":", "return", "[", "{", "'Name'", ":", "'reward-training'", ",", "'Regex'", ":", "'^Training>.*Total reward=(.*?),'", "}", ",", "{", "...
Provides default metric definitions based on provided toolkit. Args: toolkit(sagemaker.rl.RLToolkit): RL Toolkit to be used for training. Returns: list: metric definitions
[ "Provides", "default", "metric", "definitions", "based", "on", "provided", "toolkit", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/rl/estimator.py#L370-L393
train
Provides default metric definitions based on provided toolkit.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
prepare_framework
def prepare_framework(estimator, s3_operations): """Prepare S3 operations (specify where to upload `source_dir`) and environment variables related to framework. Args: estimator (sagemaker.estimator.Estimator): The framework estimator to get information from and update. s3_operations (dict):...
python
def prepare_framework(estimator, s3_operations): """Prepare S3 operations (specify where to upload `source_dir`) and environment variables related to framework. Args: estimator (sagemaker.estimator.Estimator): The framework estimator to get information from and update. s3_operations (dict):...
[ "def", "prepare_framework", "(", "estimator", ",", "s3_operations", ")", ":", "if", "estimator", ".", "code_location", "is", "not", "None", ":", "bucket", ",", "key", "=", "fw_utils", ".", "parse_s3_url", "(", "estimator", ".", "code_location", ")", "key", "...
Prepare S3 operations (specify where to upload `source_dir`) and environment variables related to framework. Args: estimator (sagemaker.estimator.Estimator): The framework estimator to get information from and update. s3_operations (dict): The dict to specify s3 operations (upload `source_dir`)...
[ "Prepare", "S3", "operations", "(", "specify", "where", "to", "upload", "source_dir", ")", "and", "environment", "variables", "related", "to", "framework", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L23-L57
train
Prepare the framework for the current job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
prepare_amazon_algorithm_estimator
def prepare_amazon_algorithm_estimator(estimator, inputs, mini_batch_size=None): """ Set up amazon algorithm estimator, adding the required `feature_dim` hyperparameter from training data. Args: estimator (sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase): An estimator for a b...
python
def prepare_amazon_algorithm_estimator(estimator, inputs, mini_batch_size=None): """ Set up amazon algorithm estimator, adding the required `feature_dim` hyperparameter from training data. Args: estimator (sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase): An estimator for a b...
[ "def", "prepare_amazon_algorithm_estimator", "(", "estimator", ",", "inputs", ",", "mini_batch_size", "=", "None", ")", ":", "if", "isinstance", "(", "inputs", ",", "list", ")", ":", "for", "record", "in", "inputs", ":", "if", "isinstance", "(", "record", ",...
Set up amazon algorithm estimator, adding the required `feature_dim` hyperparameter from training data. Args: estimator (sagemaker.amazon.amazon_estimator.AmazonAlgorithmEstimatorBase): An estimator for a built-in Amazon algorithm to get information from and update. inputs: The training...
[ "Set", "up", "amazon", "algorithm", "estimator", "adding", "the", "required", "feature_dim", "hyperparameter", "from", "training", "data", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L60-L83
train
Prepares the amazon algorithm estimator for use with Amazon algorithm.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
training_base_config
def training_base_config(estimator, inputs=None, job_name=None, mini_batch_size=None): """Export Airflow base training config from an estimator Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to export training config from. Can be a BYO estimator, Framework es...
python
def training_base_config(estimator, inputs=None, job_name=None, mini_batch_size=None): """Export Airflow base training config from an estimator Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to export training config from. Can be a BYO estimator, Framework es...
[ "def", "training_base_config", "(", "estimator", ",", "inputs", "=", "None", ",", "job_name", "=", "None", ",", "mini_batch_size", "=", "None", ")", ":", "default_bucket", "=", "estimator", ".", "sagemaker_session", ".", "default_bucket", "(", ")", "s3_operation...
Export Airflow base training config from an estimator Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to export training config from. Can be a BYO estimator, Framework estimator or Amazon algorithm estimator. inputs: Information about the training data. Pl...
[ "Export", "Airflow", "base", "training", "config", "from", "an", "estimator" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L86-L162
train
Export training config from an estimator base training config.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
training_config
def training_config(estimator, inputs=None, job_name=None, mini_batch_size=None): """Export Airflow training config from an estimator Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to export training config from. Can be a BYO estimator, Framework estimator or...
python
def training_config(estimator, inputs=None, job_name=None, mini_batch_size=None): """Export Airflow training config from an estimator Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to export training config from. Can be a BYO estimator, Framework estimator or...
[ "def", "training_config", "(", "estimator", ",", "inputs", "=", "None", ",", "job_name", "=", "None", ",", "mini_batch_size", "=", "None", ")", ":", "train_config", "=", "training_base_config", "(", "estimator", ",", "inputs", ",", "job_name", ",", "mini_batch...
Export Airflow training config from an estimator Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to export training config from. Can be a BYO estimator, Framework estimator or Amazon algorithm estimator. inputs: Information about the training data. Please ...
[ "Export", "Airflow", "training", "config", "from", "an", "estimator" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L165-L204
train
Export training config from an estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
tuning_config
def tuning_config(tuner, inputs, job_name=None): """Export Airflow tuning config from an estimator Args: tuner (sagemaker.tuner.HyperparameterTuner): The tuner to export tuning config from. inputs: Information about the training data. Please refer to the ``fit()`` method of the ...
python
def tuning_config(tuner, inputs, job_name=None): """Export Airflow tuning config from an estimator Args: tuner (sagemaker.tuner.HyperparameterTuner): The tuner to export tuning config from. inputs: Information about the training data. Please refer to the ``fit()`` method of the ...
[ "def", "tuning_config", "(", "tuner", ",", "inputs", ",", "job_name", "=", "None", ")", ":", "train_config", "=", "training_base_config", "(", "tuner", ".", "estimator", ",", "inputs", ")", "hyperparameters", "=", "train_config", ".", "pop", "(", "'HyperParame...
Export Airflow tuning config from an estimator Args: tuner (sagemaker.tuner.HyperparameterTuner): The tuner to export tuning config from. inputs: Information about the training data. Please refer to the ``fit()`` method of the associated estimator in the tuner, as this can take any ...
[ "Export", "Airflow", "tuning", "config", "from", "an", "estimator" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L207-L280
train
Export Airflow tuning config from an estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
update_submit_s3_uri
def update_submit_s3_uri(estimator, job_name): """Updated the S3 URI of the framework source directory in given estimator. Args: estimator (sagemaker.estimator.Framework): The Framework estimator to update. job_name (str): The new job name included in the submit S3 URI Returns: str...
python
def update_submit_s3_uri(estimator, job_name): """Updated the S3 URI of the framework source directory in given estimator. Args: estimator (sagemaker.estimator.Framework): The Framework estimator to update. job_name (str): The new job name included in the submit S3 URI Returns: str...
[ "def", "update_submit_s3_uri", "(", "estimator", ",", "job_name", ")", ":", "if", "estimator", ".", "uploaded_code", "is", "None", ":", "return", "pattern", "=", "r'(?<=/)[^/]+?(?=/source/sourcedir.tar.gz)'", "# update the S3 URI with the latest training job.", "# s3://path/o...
Updated the S3 URI of the framework source directory in given estimator. Args: estimator (sagemaker.estimator.Framework): The Framework estimator to update. job_name (str): The new job name included in the submit S3 URI Returns: str: The updated S3 URI of framework source directory
[ "Updated", "the", "S3", "URI", "of", "the", "framework", "source", "directory", "in", "given", "estimator", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L283-L303
train
Updates the S3 URI of the framework source directory in given estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
update_estimator_from_task
def update_estimator_from_task(estimator, task_id, task_type): """Update training job of the estimator from a task in the DAG Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to update task_id (str): The task id of any airflow.contrib.operators.SageMakerTrainingOperator or ...
python
def update_estimator_from_task(estimator, task_id, task_type): """Update training job of the estimator from a task in the DAG Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to update task_id (str): The task id of any airflow.contrib.operators.SageMakerTrainingOperator or ...
[ "def", "update_estimator_from_task", "(", "estimator", ",", "task_id", ",", "task_type", ")", ":", "if", "task_type", "is", "None", ":", "return", "if", "task_type", ".", "lower", "(", ")", "==", "'training'", ":", "training_job", "=", "\"{{ ti.xcom_pull(task_id...
Update training job of the estimator from a task in the DAG Args: estimator (sagemaker.estimator.EstimatorBase): The estimator to update task_id (str): The task id of any airflow.contrib.operators.SageMakerTrainingOperator or airflow.contrib.operators.SageMakerTuningOperator that genera...
[ "Update", "training", "job", "of", "the", "estimator", "from", "a", "task", "in", "the", "DAG" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L306-L330
train
Update the training job of the estimator from a task in the DAG.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
prepare_framework_container_def
def prepare_framework_container_def(model, instance_type, s3_operations): """Prepare the framework model container information. Specify related S3 operations for Airflow to perform. (Upload `source_dir`) Args: model (sagemaker.model.FrameworkModel): The framework model instance_type (str): ...
python
def prepare_framework_container_def(model, instance_type, s3_operations): """Prepare the framework model container information. Specify related S3 operations for Airflow to perform. (Upload `source_dir`) Args: model (sagemaker.model.FrameworkModel): The framework model instance_type (str): ...
[ "def", "prepare_framework_container_def", "(", "model", ",", "instance_type", ",", "s3_operations", ")", ":", "deploy_image", "=", "model", ".", "image", "if", "not", "deploy_image", ":", "region_name", "=", "model", ".", "sagemaker_session", ".", "boto_session", ...
Prepare the framework model container information. Specify related S3 operations for Airflow to perform. (Upload `source_dir`) Args: model (sagemaker.model.FrameworkModel): The framework model instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge'. ...
[ "Prepare", "the", "framework", "model", "container", "information", ".", "Specify", "related", "S3", "operations", "for", "Airflow", "to", "perform", ".", "(", "Upload", "source_dir", ")" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L333-L381
train
Prepare the framework container definition for the given framework model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
model_config
def model_config(instance_type, model, role=None, image=None): """Export Airflow model config from a SageMaker model Args: instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge' model (sagemaker.model.FrameworkModel): The SageMaker model to export Airflo...
python
def model_config(instance_type, model, role=None, image=None): """Export Airflow model config from a SageMaker model Args: instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge' model (sagemaker.model.FrameworkModel): The SageMaker model to export Airflo...
[ "def", "model_config", "(", "instance_type", ",", "model", ",", "role", "=", "None", ",", "image", "=", "None", ")", ":", "s3_operations", "=", "{", "}", "model", ".", "image", "=", "image", "or", "model", ".", "image", "if", "isinstance", "(", "model"...
Export Airflow model config from a SageMaker model Args: instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge' model (sagemaker.model.FrameworkModel): The SageMaker model to export Airflow config from role (str): The ``ExecutionRoleArn`` IAM Role AR...
[ "Export", "Airflow", "model", "config", "from", "a", "SageMaker", "model" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L384-L421
train
Export Airflow model config from a SageMaker model
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
model_config_from_estimator
def model_config_from_estimator(instance_type, estimator, task_id, task_type, role=None, image=None, name=None, model_server_workers=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): """Export Airflow model config from a SageMaker estimator Args: instance_type (st...
python
def model_config_from_estimator(instance_type, estimator, task_id, task_type, role=None, image=None, name=None, model_server_workers=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): """Export Airflow model config from a SageMaker estimator Args: instance_type (st...
[ "def", "model_config_from_estimator", "(", "instance_type", ",", "estimator", ",", "task_id", ",", "task_type", ",", "role", "=", "None", ",", "image", "=", "None", ",", "name", "=", "None", ",", "model_server_workers", "=", "None", ",", "vpc_config_override", ...
Export Airflow model config from a SageMaker estimator Args: instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge' estimator (sagemaker.model.EstimatorBase): The SageMaker estimator to export Airflow config from. It has to be an estimator associ...
[ "Export", "Airflow", "model", "config", "from", "a", "SageMaker", "estimator" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L424-L465
train
Export Airflow model config from an estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
transform_config
def transform_config(transformer, data, data_type='S3Prefix', content_type=None, compression_type=None, split_type=None, job_name=None): """Export Airflow transform config from a SageMaker transformer Args: transformer (sagemaker.transformer.Transformer): The SageMaker transformer ...
python
def transform_config(transformer, data, data_type='S3Prefix', content_type=None, compression_type=None, split_type=None, job_name=None): """Export Airflow transform config from a SageMaker transformer Args: transformer (sagemaker.transformer.Transformer): The SageMaker transformer ...
[ "def", "transform_config", "(", "transformer", ",", "data", ",", "data_type", "=", "'S3Prefix'", ",", "content_type", "=", "None", ",", "compression_type", "=", "None", ",", "split_type", "=", "None", ",", "job_name", "=", "None", ")", ":", "if", "job_name",...
Export Airflow transform config from a SageMaker transformer Args: transformer (sagemaker.transformer.Transformer): The SageMaker transformer to export Airflow config from. data (str): Input data location in S3. data_type (str): What the S3 location defines (default: 'S3Prefix')...
[ "Export", "Airflow", "transform", "config", "from", "a", "SageMaker", "transformer" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L468-L530
train
Export Airflow transform config from a SageMaker transformer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
transform_config_from_estimator
def transform_config_from_estimator(estimator, task_id, task_type, instance_count, instance_type, data, data_type='S3Prefix', content_type=None, compression_type=None, split_type=None, job_name=None, model_name=None, strategy=None, assemble_with=No...
python
def transform_config_from_estimator(estimator, task_id, task_type, instance_count, instance_type, data, data_type='S3Prefix', content_type=None, compression_type=None, split_type=None, job_name=None, model_name=None, strategy=None, assemble_with=No...
[ "def", "transform_config_from_estimator", "(", "estimator", ",", "task_id", ",", "task_type", ",", "instance_count", ",", "instance_type", ",", "data", ",", "data_type", "=", "'S3Prefix'", ",", "content_type", "=", "None", ",", "compression_type", "=", "None", ","...
Export Airflow transform config from a SageMaker estimator Args: estimator (sagemaker.model.EstimatorBase): The SageMaker estimator to export Airflow config from. It has to be an estimator associated with a training job. task_id (str): The task id of any airflow.contrib.operators.SageMa...
[ "Export", "Airflow", "transform", "config", "from", "a", "SageMaker", "estimator" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L533-L617
train
Export Airflow transform config from an estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
deploy_config
def deploy_config(model, initial_instance_count, instance_type, endpoint_name=None, tags=None): """Export Airflow deploy config from a SageMaker model Args: model (sagemaker.model.Model): The SageMaker model to export the Airflow config from. instance_type (str): The EC2 instance type to deploy...
python
def deploy_config(model, initial_instance_count, instance_type, endpoint_name=None, tags=None): """Export Airflow deploy config from a SageMaker model Args: model (sagemaker.model.Model): The SageMaker model to export the Airflow config from. instance_type (str): The EC2 instance type to deploy...
[ "def", "deploy_config", "(", "model", ",", "initial_instance_count", ",", "instance_type", ",", "endpoint_name", "=", "None", ",", "tags", "=", "None", ")", ":", "model_base_config", "=", "model_config", "(", "instance_type", ",", "model", ")", "production_variant...
Export Airflow deploy config from a SageMaker model Args: model (sagemaker.model.Model): The SageMaker model to export the Airflow config from. instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge'. initial_instance_count (int): The initial number o...
[ "Export", "Airflow", "deploy", "config", "from", "a", "SageMaker", "model" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L620-L662
train
Export Airflow deploy config from a SageMaker model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/workflow/airflow.py
deploy_config_from_estimator
def deploy_config_from_estimator(estimator, task_id, task_type, initial_instance_count, instance_type, model_name=None, endpoint_name=None, tags=None, **kwargs): """Export Airflow deploy config from a SageMaker estimator Args: estimator (sagemaker.model.EstimatorBase): ...
python
def deploy_config_from_estimator(estimator, task_id, task_type, initial_instance_count, instance_type, model_name=None, endpoint_name=None, tags=None, **kwargs): """Export Airflow deploy config from a SageMaker estimator Args: estimator (sagemaker.model.EstimatorBase): ...
[ "def", "deploy_config_from_estimator", "(", "estimator", ",", "task_id", ",", "task_type", ",", "initial_instance_count", ",", "instance_type", ",", "model_name", "=", "None", ",", "endpoint_name", "=", "None", ",", "tags", "=", "None", ",", "*", "*", "kwargs", ...
Export Airflow deploy config from a SageMaker estimator Args: estimator (sagemaker.model.EstimatorBase): The SageMaker estimator to export Airflow config from. It has to be an estimator associated with a training job. task_id (str): The task id of any airflow.contrib.operators.SageMaker...
[ "Export", "Airflow", "deploy", "config", "from", "a", "SageMaker", "estimator" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/workflow/airflow.py#L665-L696
train
Exports Airflow deploy config from an estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/algorithm.py
AlgorithmEstimator.create_model
def create_model( self, role=None, predictor_cls=None, serializer=None, deserializer=None, content_type=None, accept=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, **kwargs ): """Create a model to deploy. The serialize...
python
def create_model( self, role=None, predictor_cls=None, serializer=None, deserializer=None, content_type=None, accept=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, **kwargs ): """Create a model to deploy. The serialize...
[ "def", "create_model", "(", "self", ",", "role", "=", "None", ",", "predictor_cls", "=", "None", ",", "serializer", "=", "None", ",", "deserializer", "=", "None", ",", "content_type", "=", "None", ",", "accept", "=", "None", ",", "vpc_config_override", "="...
Create a model to deploy. The serializer, deserializer, content_type, and accept arguments are only used to define a default RealTimePredictor. They are ignored if an explicit predictor class is passed in. Other arguments are passed through to the Model class. Args: role (s...
[ "Create", "a", "model", "to", "deploy", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/algorithm.py#L204-L259
train
Create a model for deploying a resource in Amazon SageMaker.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/algorithm.py
AlgorithmEstimator.transformer
def transformer(self, instance_count, instance_type, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, env=None, max_concurrent_transforms=None, max_payload=None, tags=None, role=None, volume_kms_key=None): """Return a ``Transformer`` ...
python
def transformer(self, instance_count, instance_type, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, env=None, max_concurrent_transforms=None, max_payload=None, tags=None, role=None, volume_kms_key=None): """Return a ``Transformer`` ...
[ "def", "transformer", "(", "self", ",", "instance_count", ",", "instance_type", ",", "strategy", "=", "None", ",", "assemble_with", "=", "None", ",", "output_path", "=", "None", ",", "output_kms_key", "=", "None", ",", "accept", "=", "None", ",", "env", "=...
Return a ``Transformer`` that uses a SageMaker Model based on the training job. It reuses the SageMaker Session and base job name used by the Estimator. Args: instance_count (int): Number of EC2 instances to use. instance_type (str): Type of EC2 instance to use, for example, 'ml...
[ "Return", "a", "Transformer", "that", "uses", "a", "SageMaker", "Model", "based", "on", "the", "training", "job", ".", "It", "reuses", "the", "SageMaker", "Session", "and", "base", "job", "name", "used", "by", "the", "Estimator", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/algorithm.py#L261-L311
train
Returns a Transformer that uses a SageMaker Model based on the training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase._prepare_for_training
def _prepare_for_training(self, job_name=None): """Set any values in the estimator that need to be set before training. Args: * job_name (str): Name of the training job to be created. If not specified, one is generated, using the base name given to the constructor if applica...
python
def _prepare_for_training(self, job_name=None): """Set any values in the estimator that need to be set before training. Args: * job_name (str): Name of the training job to be created. If not specified, one is generated, using the base name given to the constructor if applica...
[ "def", "_prepare_for_training", "(", "self", ",", "job_name", "=", "None", ")", ":", "if", "job_name", "is", "not", "None", ":", "self", ".", "_current_job_name", "=", "job_name", "else", ":", "# honor supplied base_job_name or generate it", "if", "self", ".", "...
Set any values in the estimator that need to be set before training. Args: * job_name (str): Name of the training job to be created. If not specified, one is generated, using the base name given to the constructor if applicable.
[ "Set", "any", "values", "in", "the", "estimator", "that", "need", "to", "be", "set", "before", "training", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L175-L202
train
Set any values in the estimator that need to be set before training.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.fit
def fit(self, inputs=None, wait=True, logs=True, job_name=None): """Train a model using the input training dataset. The API calls the Amazon SageMaker CreateTrainingJob API to start model training. The API uses configuration you provided to create the estimator and the specified input t...
python
def fit(self, inputs=None, wait=True, logs=True, job_name=None): """Train a model using the input training dataset. The API calls the Amazon SageMaker CreateTrainingJob API to start model training. The API uses configuration you provided to create the estimator and the specified input t...
[ "def", "fit", "(", "self", ",", "inputs", "=", "None", ",", "wait", "=", "True", ",", "logs", "=", "True", ",", "job_name", "=", "None", ")", ":", "self", ".", "_prepare_for_training", "(", "job_name", "=", "job_name", ")", "self", ".", "latest_trainin...
Train a model using the input training dataset. The API calls the Amazon SageMaker CreateTrainingJob API to start model training. The API uses configuration you provided to create the estimator and the specified input training data to send the CreatingTrainingJob request to Amazon SageMaker. ...
[ "Train", "a", "model", "using", "the", "input", "training", "dataset", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L204-L236
train
Train a model using the input training dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.compile_model
def compile_model(self, target_instance_family, input_shape, output_path, framework=None, framework_version=None, compile_max_run=5 * 60, tags=None, **kwargs): """Compile a Neo model using the input model. Args: target_instance_family (str): Identifies the device that ...
python
def compile_model(self, target_instance_family, input_shape, output_path, framework=None, framework_version=None, compile_max_run=5 * 60, tags=None, **kwargs): """Compile a Neo model using the input model. Args: target_instance_family (str): Identifies the device that ...
[ "def", "compile_model", "(", "self", ",", "target_instance_family", ",", "input_shape", ",", "output_path", ",", "framework", "=", "None", ",", "framework_version", "=", "None", ",", "compile_max_run", "=", "5", "*", "60", ",", "tags", "=", "None", ",", "*",...
Compile a Neo model using the input model. Args: target_instance_family (str): Identifies the device that you want to run your model after compilation, for example: ml_c5. Allowed strings are: ml_c5, ml_m5, ml_c4, ml_m4, jetsontx1, jetsontx2, ml_p2, ml_p3, deeplens, ...
[ "Compile", "a", "Neo", "model", "using", "the", "input", "model", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L242-L287
train
Compile a SageMaker Neo model using the input model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.attach
def attach(cls, training_job_name, sagemaker_session=None, model_channel_name='model'): """Attach to an existing training job. Create an Estimator bound to an existing training job, each subclass is responsible to implement ``_prepare_init_params_from_job_description()`` as this method delegate...
python
def attach(cls, training_job_name, sagemaker_session=None, model_channel_name='model'): """Attach to an existing training job. Create an Estimator bound to an existing training job, each subclass is responsible to implement ``_prepare_init_params_from_job_description()`` as this method delegate...
[ "def", "attach", "(", "cls", ",", "training_job_name", ",", "sagemaker_session", "=", "None", ",", "model_channel_name", "=", "'model'", ")", ":", "sagemaker_session", "=", "sagemaker_session", "or", "Session", "(", ")", "job_details", "=", "sagemaker_session", "....
Attach to an existing training job. Create an Estimator bound to an existing training job, each subclass is responsible to implement ``_prepare_init_params_from_job_description()`` as this method delegates the actual conversion of a training job description to the arguments that the class const...
[ "Attach", "to", "an", "existing", "training", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L290-L328
train
Attach to an existing training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.deploy
def deploy(self, initial_instance_count, instance_type, accelerator_type=None, endpoint_name=None, use_compiled_model=False, update_endpoint=False, **kwargs): """Deploy the trained model to an Amazon SageMaker endpoint and return a ``sagemaker.RealTimePredictor`` object. More information...
python
def deploy(self, initial_instance_count, instance_type, accelerator_type=None, endpoint_name=None, use_compiled_model=False, update_endpoint=False, **kwargs): """Deploy the trained model to an Amazon SageMaker endpoint and return a ``sagemaker.RealTimePredictor`` object. More information...
[ "def", "deploy", "(", "self", ",", "initial_instance_count", ",", "instance_type", ",", "accelerator_type", "=", "None", ",", "endpoint_name", "=", "None", ",", "use_compiled_model", "=", "False", ",", "update_endpoint", "=", "False", ",", "*", "*", "kwargs", ...
Deploy the trained model to an Amazon SageMaker endpoint and return a ``sagemaker.RealTimePredictor`` object. More information: http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-training.html Args: initial_instance_count (int): Minimum number of EC2 instances to deploy to...
[ "Deploy", "the", "trained", "model", "to", "an", "Amazon", "SageMaker", "endpoint", "and", "return", "a", "sagemaker", ".", "RealTimePredictor", "object", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L330-L381
train
Deploy the trained model to an Amazon SageMaker endpoint and return a SageMaker. RealTimePredictor object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.model_data
def model_data(self): """str: The model location in S3. Only set if Estimator has been ``fit()``.""" if self.latest_training_job is not None: model_uri = self.sagemaker_session.sagemaker_client.describe_training_job( TrainingJobName=self.latest_training_job.name)['ModelArtifa...
python
def model_data(self): """str: The model location in S3. Only set if Estimator has been ``fit()``.""" if self.latest_training_job is not None: model_uri = self.sagemaker_session.sagemaker_client.describe_training_job( TrainingJobName=self.latest_training_job.name)['ModelArtifa...
[ "def", "model_data", "(", "self", ")", ":", "if", "self", ".", "latest_training_job", "is", "not", "None", ":", "model_uri", "=", "self", ".", "sagemaker_session", ".", "sagemaker_client", ".", "describe_training_job", "(", "TrainingJobName", "=", "self", ".", ...
str: The model location in S3. Only set if Estimator has been ``fit()``.
[ "str", ":", "The", "model", "location", "in", "S3", ".", "Only", "set", "if", "Estimator", "has", "been", "fit", "()", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L384-L394
train
str - The model location in S3. Only set if Estimator has been fit. Only set if Estimator has been fit. Only set if Estimator has been fit.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase._prepare_init_params_from_job_description
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
python
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
[ "def", "_prepare_init_params_from_job_description", "(", "cls", ",", "job_details", ",", "model_channel_name", "=", "None", ")", ":", "init_params", "=", "dict", "(", ")", "init_params", "[", "'role'", "]", "=", "job_details", "[", "'RoleArn'", "]", "init_params",...
Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_name (str): Name of the channel where pre-trained model data will be downloaded. Returns: ...
[ "Convert", "the", "job", "description", "to", "init", "params", "that", "can", "be", "handled", "by", "the", "class", "constructor" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L408-L462
train
Convert the job description to init params that can be handled by the class constructor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.delete_endpoint
def delete_endpoint(self): """Delete an Amazon SageMaker ``Endpoint``. Raises: ValueError: If the endpoint does not exist. """ self._ensure_latest_training_job(error_message='Endpoint was not created yet') self.sagemaker_session.delete_endpoint(self.latest_training_j...
python
def delete_endpoint(self): """Delete an Amazon SageMaker ``Endpoint``. Raises: ValueError: If the endpoint does not exist. """ self._ensure_latest_training_job(error_message='Endpoint was not created yet') self.sagemaker_session.delete_endpoint(self.latest_training_j...
[ "def", "delete_endpoint", "(", "self", ")", ":", "self", ".", "_ensure_latest_training_job", "(", "error_message", "=", "'Endpoint was not created yet'", ")", "self", ".", "sagemaker_session", ".", "delete_endpoint", "(", "self", ".", "latest_training_job", ".", "name...
Delete an Amazon SageMaker ``Endpoint``. Raises: ValueError: If the endpoint does not exist.
[ "Delete", "an", "Amazon", "SageMaker", "Endpoint", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L464-L471
train
Delete an Amazon SageMaker Endpoint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.transformer
def transformer(self, instance_count, instance_type, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, env=None, max_concurrent_transforms=None, max_payload=None, tags=None, role=None, volume_kms_key=None): """Return a ``Transformer`` ...
python
def transformer(self, instance_count, instance_type, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, env=None, max_concurrent_transforms=None, max_payload=None, tags=None, role=None, volume_kms_key=None): """Return a ``Transformer`` ...
[ "def", "transformer", "(", "self", ",", "instance_count", ",", "instance_type", ",", "strategy", "=", "None", ",", "assemble_with", "=", "None", ",", "output_path", "=", "None", ",", "output_kms_key", "=", "None", ",", "accept", "=", "None", ",", "env", "=...
Return a ``Transformer`` that uses a SageMaker Model based on the training job. It reuses the SageMaker Session and base job name used by the Estimator. Args: instance_count (int): Number of EC2 instances to use. instance_type (str): Type of EC2 instance to use, for example, 'ml...
[ "Return", "a", "Transformer", "that", "uses", "a", "SageMaker", "Model", "based", "on", "the", "training", "job", ".", "It", "reuses", "the", "SageMaker", "Session", "and", "base", "job", "name", "used", "by", "the", "Estimator", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L473-L513
train
Returns a Transformer that uses a SageMaker Model based on the training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.training_job_analytics
def training_job_analytics(self): """Return a ``TrainingJobAnalytics`` object for the current training job. """ if self._current_job_name is None: raise ValueError('Estimator is not associated with a TrainingJob') return TrainingJobAnalytics(self._current_job_name, sagemaker_...
python
def training_job_analytics(self): """Return a ``TrainingJobAnalytics`` object for the current training job. """ if self._current_job_name is None: raise ValueError('Estimator is not associated with a TrainingJob') return TrainingJobAnalytics(self._current_job_name, sagemaker_...
[ "def", "training_job_analytics", "(", "self", ")", ":", "if", "self", ".", "_current_job_name", "is", "None", ":", "raise", "ValueError", "(", "'Estimator is not associated with a TrainingJob'", ")", "return", "TrainingJobAnalytics", "(", "self", ".", "_current_job_name...
Return a ``TrainingJobAnalytics`` object for the current training job.
[ "Return", "a", "TrainingJobAnalytics", "object", "for", "the", "current", "training", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L516-L521
train
Return a TrainingJobAnalytics object for the current training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
EstimatorBase.get_vpc_config
def get_vpc_config(self, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): """ Returns VpcConfig dict either from this Estimator's subnets and security groups, or else validate and return an optional override value. """ if vpc_config_override is vpc_utils.VPC_CONFIG_DEFAULT: ...
python
def get_vpc_config(self, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): """ Returns VpcConfig dict either from this Estimator's subnets and security groups, or else validate and return an optional override value. """ if vpc_config_override is vpc_utils.VPC_CONFIG_DEFAULT: ...
[ "def", "get_vpc_config", "(", "self", ",", "vpc_config_override", "=", "vpc_utils", ".", "VPC_CONFIG_DEFAULT", ")", ":", "if", "vpc_config_override", "is", "vpc_utils", ".", "VPC_CONFIG_DEFAULT", ":", "return", "vpc_utils", ".", "to_dict", "(", "self", ".", "subne...
Returns VpcConfig dict either from this Estimator's subnets and security groups, or else validate and return an optional override value.
[ "Returns", "VpcConfig", "dict", "either", "from", "this", "Estimator", "s", "subnets", "and", "security", "groups", "or", "else", "validate", "and", "return", "an", "optional", "override", "value", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L523-L531
train
Returns a dict of VpcConfig values from this Estimator s subnets security groups and vpc_config_override.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
_TrainingJob.start_new
def start_new(cls, estimator, inputs): """Create a new Amazon SageMaker training job from the estimator. Args: estimator (sagemaker.estimator.EstimatorBase): Estimator object created by the user. inputs (str): Parameters used when called :meth:`~sagemaker.estimator.EstimatorBas...
python
def start_new(cls, estimator, inputs): """Create a new Amazon SageMaker training job from the estimator. Args: estimator (sagemaker.estimator.EstimatorBase): Estimator object created by the user. inputs (str): Parameters used when called :meth:`~sagemaker.estimator.EstimatorBas...
[ "def", "start_new", "(", "cls", ",", "estimator", ",", "inputs", ")", ":", "local_mode", "=", "estimator", ".", "sagemaker_session", ".", "local_mode", "model_uri", "=", "estimator", ".", "model_uri", "# Allow file:// input only in local mode", "if", "cls", ".", "...
Create a new Amazon SageMaker training job from the estimator. Args: estimator (sagemaker.estimator.EstimatorBase): Estimator object created by the user. inputs (str): Parameters used when called :meth:`~sagemaker.estimator.EstimatorBase.fit`. Returns: sagemaker.es...
[ "Create", "a", "new", "Amazon", "SageMaker", "training", "job", "from", "the", "estimator", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L540-L585
train
Create a new Amazon SageMaker training job from an estimator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Estimator.create_model
def create_model(self, role=None, image=None, predictor_cls=None, serializer=None, deserializer=None, content_type=None, accept=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, **kwargs): """ Create a model to deploy. Args: role (str): The ``ExecutionRole...
python
def create_model(self, role=None, image=None, predictor_cls=None, serializer=None, deserializer=None, content_type=None, accept=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, **kwargs): """ Create a model to deploy. Args: role (str): The ``ExecutionRole...
[ "def", "create_model", "(", "self", ",", "role", "=", "None", ",", "image", "=", "None", ",", "predictor_cls", "=", "None", ",", "serializer", "=", "None", ",", "deserializer", "=", "None", ",", "content_type", "=", "None", ",", "accept", "=", "None", ...
Create a model to deploy. Args: role (str): The ``ExecutionRoleArn`` IAM Role ARN for the ``Model``, which is also used during transform jobs. If not specified, the role from the Estimator will be used. image (str): An container image to use for deploying the model. Defa...
[ "Create", "a", "model", "to", "deploy", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L695-L732
train
Creates a new model for the given parameters.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Estimator._prepare_init_params_from_job_description
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
python
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
[ "def", "_prepare_init_params_from_job_description", "(", "cls", ",", "job_details", ",", "model_channel_name", "=", "None", ")", ":", "init_params", "=", "super", "(", "Estimator", ",", "cls", ")", ".", "_prepare_init_params_from_job_description", "(", "job_details", ...
Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_name (str): Name of the channel where pre-trained model data will be downloaded Returns: ...
[ "Convert", "the", "job", "description", "to", "init", "params", "that", "can", "be", "handled", "by", "the", "class", "constructor" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L735-L749
train
Convert the job description to init params that can be handled by the class constructor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework._prepare_for_training
def _prepare_for_training(self, job_name=None): """Set hyperparameters needed for training. This method will also validate ``source_dir``. Args: * job_name (str): Name of the training job to be created. If not specified, one is generated, using the base name given to the con...
python
def _prepare_for_training(self, job_name=None): """Set hyperparameters needed for training. This method will also validate ``source_dir``. Args: * job_name (str): Name of the training job to be created. If not specified, one is generated, using the base name given to the con...
[ "def", "_prepare_for_training", "(", "self", ",", "job_name", "=", "None", ")", ":", "super", "(", "Framework", ",", "self", ")", ".", "_prepare_for_training", "(", "job_name", "=", "job_name", ")", "# validate source dir will raise a ValueError if there is something wr...
Set hyperparameters needed for training. This method will also validate ``source_dir``. Args: * job_name (str): Name of the training job to be created. If not specified, one is generated, using the base name given to the constructor if applicable.
[ "Set", "hyperparameters", "needed", "for", "training", ".", "This", "method", "will", "also", "validate", "source_dir", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L824-L860
train
Set hyperparameters needed for training. This method will also validate source_dir and source_dir.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework._stage_user_code_in_s3
def _stage_user_code_in_s3(self): """Upload the user training script to s3 and return the location. Returns: s3 uri """ local_mode = self.output_path.startswith('file://') if self.code_location is None and local_mode: code_bucket = self.sagemaker_session.default_bu...
python
def _stage_user_code_in_s3(self): """Upload the user training script to s3 and return the location. Returns: s3 uri """ local_mode = self.output_path.startswith('file://') if self.code_location is None and local_mode: code_bucket = self.sagemaker_session.default_bu...
[ "def", "_stage_user_code_in_s3", "(", "self", ")", ":", "local_mode", "=", "self", ".", "output_path", ".", "startswith", "(", "'file://'", ")", "if", "self", ".", "code_location", "is", "None", "and", "local_mode", ":", "code_bucket", "=", "self", ".", "sag...
Upload the user training script to s3 and return the location. Returns: s3 uri
[ "Upload", "the", "user", "training", "script", "to", "s3", "and", "return", "the", "location", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L862-L892
train
Upload the user training script to s3 and return the location.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework._model_source_dir
def _model_source_dir(self): """Get the appropriate value to pass as source_dir to model constructor on deploying Returns: str: Either a local or an S3 path pointing to the source_dir to be used for code by the model to be deployed """ return self.source_dir if self.sagemake...
python
def _model_source_dir(self): """Get the appropriate value to pass as source_dir to model constructor on deploying Returns: str: Either a local or an S3 path pointing to the source_dir to be used for code by the model to be deployed """ return self.source_dir if self.sagemake...
[ "def", "_model_source_dir", "(", "self", ")", ":", "return", "self", ".", "source_dir", "if", "self", ".", "sagemaker_session", ".", "local_mode", "else", "self", ".", "uploaded_code", ".", "s3_prefix" ]
Get the appropriate value to pass as source_dir to model constructor on deploying Returns: str: Either a local or an S3 path pointing to the source_dir to be used for code by the model to be deployed
[ "Get", "the", "appropriate", "value", "to", "pass", "as", "source_dir", "to", "model", "constructor", "on", "deploying" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L894-L900
train
Get the appropriate value to pass as source_dir to model constructor on deploying
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework._prepare_init_params_from_job_description
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
python
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
[ "def", "_prepare_init_params_from_job_description", "(", "cls", ",", "job_details", ",", "model_channel_name", "=", "None", ")", ":", "init_params", "=", "super", "(", "Framework", ",", "cls", ")", ".", "_prepare_init_params_from_job_description", "(", "job_details", ...
Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_name (str): Name of the channel where pre-trained model data will be downloaded Returns: ...
[ "Convert", "the", "job", "description", "to", "init", "params", "that", "can", "be", "handled", "by", "the", "class", "constructor" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L914-L946
train
Convert the job description to init params that can be handled by the class constructor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework.train_image
def train_image(self): """Return the Docker image to use for training. The :meth:`~sagemaker.estimator.EstimatorBase.fit` method, which does the model training, calls this method to find the image to use for model training. Returns: str: The URI of the Docker image. ...
python
def train_image(self): """Return the Docker image to use for training. The :meth:`~sagemaker.estimator.EstimatorBase.fit` method, which does the model training, calls this method to find the image to use for model training. Returns: str: The URI of the Docker image. ...
[ "def", "train_image", "(", "self", ")", ":", "if", "self", ".", "image_name", ":", "return", "self", ".", "image_name", "else", ":", "return", "create_image_uri", "(", "self", ".", "sagemaker_session", ".", "boto_region_name", ",", "self", ".", "__framework_na...
Return the Docker image to use for training. The :meth:`~sagemaker.estimator.EstimatorBase.fit` method, which does the model training, calls this method to find the image to use for model training. Returns: str: The URI of the Docker image.
[ "Return", "the", "Docker", "image", "to", "use", "for", "training", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L948-L964
train
Returns the URI of the Docker image to use for training.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework.attach
def attach(cls, training_job_name, sagemaker_session=None, model_channel_name='model'): """Attach to an existing training job. Create an Estimator bound to an existing training job, each subclass is responsible to implement ``_prepare_init_params_from_job_description()`` as this method delegate...
python
def attach(cls, training_job_name, sagemaker_session=None, model_channel_name='model'): """Attach to an existing training job. Create an Estimator bound to an existing training job, each subclass is responsible to implement ``_prepare_init_params_from_job_description()`` as this method delegate...
[ "def", "attach", "(", "cls", ",", "training_job_name", ",", "sagemaker_session", "=", "None", ",", "model_channel_name", "=", "'model'", ")", ":", "estimator", "=", "super", "(", "Framework", ",", "cls", ")", ".", "attach", "(", "training_job_name", ",", "sa...
Attach to an existing training job. Create an Estimator bound to an existing training job, each subclass is responsible to implement ``_prepare_init_params_from_job_description()`` as this method delegates the actual conversion of a training job description to the arguments that the class const...
[ "Attach", "to", "an", "existing", "training", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L967-L1002
train
Attach to an existing training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/estimator.py
Framework.transformer
def transformer(self, instance_count, instance_type, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, env=None, max_concurrent_transforms=None, max_payload=None, tags=None, role=None, model_server_workers=None, volume_kms_key=None): "...
python
def transformer(self, instance_count, instance_type, strategy=None, assemble_with=None, output_path=None, output_kms_key=None, accept=None, env=None, max_concurrent_transforms=None, max_payload=None, tags=None, role=None, model_server_workers=None, volume_kms_key=None): "...
[ "def", "transformer", "(", "self", ",", "instance_count", ",", "instance_type", ",", "strategy", "=", "None", ",", "assemble_with", "=", "None", ",", "output_path", "=", "None", ",", "output_kms_key", "=", "None", ",", "accept", "=", "None", ",", "env", "=...
Return a ``Transformer`` that uses a SageMaker Model based on the training job. It reuses the SageMaker Session and base job name used by the Estimator. Args: instance_count (int): Number of EC2 instances to use. instance_type (str): Type of EC2 instance to use, for example, 'ml...
[ "Return", "a", "Transformer", "that", "uses", "a", "SageMaker", "Model", "based", "on", "the", "training", "job", ".", "It", "reuses", "the", "SageMaker", "Session", "and", "base", "job", "name", "used", "by", "the", "Estimator", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/estimator.py#L1018-L1070
train
Returns a Transformer that uses a SageMaker Model based on the training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/amazon/hyperparameter.py
Hyperparameter.serialize_all
def serialize_all(obj): """Return all non-None ``hyperparameter`` values on ``obj`` as a ``dict[str,str].``""" if '_hyperparameters' not in dir(obj): return {} return {k: str(v) for k, v in obj._hyperparameters.items() if v is not None}
python
def serialize_all(obj): """Return all non-None ``hyperparameter`` values on ``obj`` as a ``dict[str,str].``""" if '_hyperparameters' not in dir(obj): return {} return {k: str(v) for k, v in obj._hyperparameters.items() if v is not None}
[ "def", "serialize_all", "(", "obj", ")", ":", "if", "'_hyperparameters'", "not", "in", "dir", "(", "obj", ")", ":", "return", "{", "}", "return", "{", "k", ":", "str", "(", "v", ")", "for", "k", ",", "v", "in", "obj", ".", "_hyperparameters", ".", ...
Return all non-None ``hyperparameter`` values on ``obj`` as a ``dict[str,str].``
[ "Return", "all", "non", "-", "None", "hyperparameter", "values", "on", "obj", "as", "a", "dict", "[", "str", "str", "]", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/amazon/hyperparameter.py#L66-L70
train
Return all non - None hyperparameter values on obj as a dict [ str ]
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/local/entities.py
_LocalTransformJob.start
def start(self, input_data, output_data, transform_resources, **kwargs): """Start the Local Transform Job Args: input_data (dict): Describes the dataset to be transformed and the location where it is stored. output_data (dict): Identifies the location where to save the results f...
python
def start(self, input_data, output_data, transform_resources, **kwargs): """Start the Local Transform Job Args: input_data (dict): Describes the dataset to be transformed and the location where it is stored. output_data (dict): Identifies the location where to save the results f...
[ "def", "start", "(", "self", ",", "input_data", ",", "output_data", ",", "transform_resources", ",", "*", "*", "kwargs", ")", ":", "self", ".", "transform_resources", "=", "transform_resources", "self", ".", "input_data", "=", "input_data", "self", ".", "outpu...
Start the Local Transform Job Args: input_data (dict): Describes the dataset to be transformed and the location where it is stored. output_data (dict): Identifies the location where to save the results from the transform job transform_resources (dict): compute instances for ...
[ "Start", "the", "Local", "Transform", "Job" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/local/entities.py#L111-L159
train
Start the Local Transform Job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/local/entities.py
_LocalTransformJob.describe
def describe(self): """Describe this _LocalTransformJob The response is a JSON-like dictionary that follows the response of the boto describe_transform_job() API. Returns: dict: description of this _LocalTransformJob """ response = { 'TransformJo...
python
def describe(self): """Describe this _LocalTransformJob The response is a JSON-like dictionary that follows the response of the boto describe_transform_job() API. Returns: dict: description of this _LocalTransformJob """ response = { 'TransformJo...
[ "def", "describe", "(", "self", ")", ":", "response", "=", "{", "'TransformJobStatus'", ":", "self", ".", "state", ",", "'ModelName'", ":", "self", ".", "model_name", ",", "'TransformJobName'", ":", "self", ".", "name", ",", "'TransformJobArn'", ":", "_UNUSE...
Describe this _LocalTransformJob The response is a JSON-like dictionary that follows the response of the boto describe_transform_job() API. Returns: dict: description of this _LocalTransformJob
[ "Describe", "this", "_LocalTransformJob" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/local/entities.py#L161-L191
train
Describe this _LocalTransformJob
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/local/entities.py
_LocalTransformJob._get_container_environment
def _get_container_environment(self, **kwargs): """Get all the Environment variables that will be passed to the container Certain input fields such as BatchStrategy have different values for the API vs the Environment variables, such as SingleRecord vs SINGLE_RECORD. This method also handles th...
python
def _get_container_environment(self, **kwargs): """Get all the Environment variables that will be passed to the container Certain input fields such as BatchStrategy have different values for the API vs the Environment variables, such as SingleRecord vs SINGLE_RECORD. This method also handles th...
[ "def", "_get_container_environment", "(", "self", ",", "*", "*", "kwargs", ")", ":", "environment", "=", "{", "}", "environment", ".", "update", "(", "self", ".", "primary_container", "[", "'Environment'", "]", ")", "environment", "[", "'SAGEMAKER_BATCH'", "]"...
Get all the Environment variables that will be passed to the container Certain input fields such as BatchStrategy have different values for the API vs the Environment variables, such as SingleRecord vs SINGLE_RECORD. This method also handles this conversion. Args: **kwargs: existin...
[ "Get", "all", "the", "Environment", "variables", "that", "will", "be", "passed", "to", "the", "container" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/local/entities.py#L193-L230
train
Returns the environment variables that will be passed to the container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/parameter.py
ParameterRange.as_tuning_range
def as_tuning_range(self, name): """Represent the parameter range as a dicionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job. Args: name (str): The name of the hyperparameter. Returns: dict[str, str]: A dictionary that contains...
python
def as_tuning_range(self, name): """Represent the parameter range as a dicionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job. Args: name (str): The name of the hyperparameter. Returns: dict[str, str]: A dictionary that contains...
[ "def", "as_tuning_range", "(", "self", ",", "name", ")", ":", "return", "{", "'Name'", ":", "name", ",", "'MinValue'", ":", "to_str", "(", "self", ".", "min_value", ")", ",", "'MaxValue'", ":", "to_str", "(", "self", ".", "max_value", ")", ",", "'Scali...
Represent the parameter range as a dicionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job. Args: name (str): The name of the hyperparameter. Returns: dict[str, str]: A dictionary that contains the name and values of the hyperparameter.
[ "Represent", "the", "parameter", "range", "as", "a", "dicionary", "suitable", "for", "a", "request", "to", "create", "an", "Amazon", "SageMaker", "hyperparameter", "tuning", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/parameter.py#L56-L69
train
Represent the parameter range as a dicionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/parameter.py
CategoricalParameter.as_json_range
def as_json_range(self, name): """Represent the parameter range as a dictionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job using one of the deep learning frameworks. The deep learning framework images require that hyperparameters be serialized as JSON. ...
python
def as_json_range(self, name): """Represent the parameter range as a dictionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job using one of the deep learning frameworks. The deep learning framework images require that hyperparameters be serialized as JSON. ...
[ "def", "as_json_range", "(", "self", ",", "name", ")", ":", "return", "{", "'Name'", ":", "name", ",", "'Values'", ":", "[", "json", ".", "dumps", "(", "v", ")", "for", "v", "in", "self", ".", "values", "]", "}" ]
Represent the parameter range as a dictionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job using one of the deep learning frameworks. The deep learning framework images require that hyperparameters be serialized as JSON. Args: name (str): The name ...
[ "Represent", "the", "parameter", "range", "as", "a", "dictionary", "suitable", "for", "a", "request", "to", "create", "an", "Amazon", "SageMaker", "hyperparameter", "tuning", "job", "using", "one", "of", "the", "deep", "learning", "frameworks", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/parameter.py#L114-L127
train
Represent the parameter range as a dictionary suitable for a request to create an Amazon SageMaker hyperparameter tuning job using one of the deep learning framework images require that hyperparameters be serialized as JSON.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
container_def
def container_def(image, model_data_url=None, env=None): """Create a definition for executing a container as part of a SageMaker model. Args: image (str): Docker image to run for this container. model_data_url (str): S3 URI of data required by this container, e.g. SageMaker training...
python
def container_def(image, model_data_url=None, env=None): """Create a definition for executing a container as part of a SageMaker model. Args: image (str): Docker image to run for this container. model_data_url (str): S3 URI of data required by this container, e.g. SageMaker training...
[ "def", "container_def", "(", "image", ",", "model_data_url", "=", "None", ",", "env", "=", "None", ")", ":", "if", "env", "is", "None", ":", "env", "=", "{", "}", "c_def", "=", "{", "'Image'", ":", "image", ",", "'Environment'", ":", "env", "}", "i...
Create a definition for executing a container as part of a SageMaker model. Args: image (str): Docker image to run for this container. model_data_url (str): S3 URI of data required by this container, e.g. SageMaker training job model artifacts (default: None). env (dict[str, str...
[ "Create", "a", "definition", "for", "executing", "a", "container", "as", "part", "of", "a", "SageMaker", "model", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1229-L1246
train
Create a definition for executing a container as part of a SageMaker model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
pipeline_container_def
def pipeline_container_def(models, instance_type=None): """ Create a definition for executing a pipeline of containers as part of a SageMaker model. Args: models (list[sagemaker.Model]): this will be a list of ``sagemaker.Model`` objects in the order the inference should be invoked. ...
python
def pipeline_container_def(models, instance_type=None): """ Create a definition for executing a pipeline of containers as part of a SageMaker model. Args: models (list[sagemaker.Model]): this will be a list of ``sagemaker.Model`` objects in the order the inference should be invoked. ...
[ "def", "pipeline_container_def", "(", "models", ",", "instance_type", "=", "None", ")", ":", "c_defs", "=", "[", "]", "# should contain list of container definitions in the same order customer passed", "for", "model", "in", "models", ":", "c_defs", ".", "append", "(", ...
Create a definition for executing a pipeline of containers as part of a SageMaker model. Args: models (list[sagemaker.Model]): this will be a list of ``sagemaker.Model`` objects in the order the inference should be invoked. instance_type (str): The EC2 instance type to deploy this Model to. ...
[ "Create", "a", "definition", "for", "executing", "a", "pipeline", "of", "containers", "as", "part", "of", "a", "SageMaker", "model", ".", "Args", ":", "models", "(", "list", "[", "sagemaker", ".", "Model", "]", ")", ":", "this", "will", "be", "a", "lis...
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1249-L1263
train
Create a list of container definitions for executing a SageMaker pipeline of containers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
production_variant
def production_variant(model_name, instance_type, initial_instance_count=1, variant_name='AllTraffic', initial_weight=1, accelerator_type=None): """Create a production variant description suitable for use in a ``ProductionVariant`` list as part of a ``CreateEndpointConfig`` request. ...
python
def production_variant(model_name, instance_type, initial_instance_count=1, variant_name='AllTraffic', initial_weight=1, accelerator_type=None): """Create a production variant description suitable for use in a ``ProductionVariant`` list as part of a ``CreateEndpointConfig`` request. ...
[ "def", "production_variant", "(", "model_name", ",", "instance_type", ",", "initial_instance_count", "=", "1", ",", "variant_name", "=", "'AllTraffic'", ",", "initial_weight", "=", "1", ",", "accelerator_type", "=", "None", ")", ":", "production_variant_configuration"...
Create a production variant description suitable for use in a ``ProductionVariant`` list as part of a ``CreateEndpointConfig`` request. Args: model_name (str): The name of the SageMaker model this production variant references. instance_type (str): The EC2 instance type for this production vari...
[ "Create", "a", "production", "variant", "description", "suitable", "for", "use", "in", "a", "ProductionVariant", "list", "as", "part", "of", "a", "CreateEndpointConfig", "request", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1266-L1294
train
Create a SageMaker production variant description suitable for use in a SageMaker EndpointConfig request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
get_execution_role
def get_execution_role(sagemaker_session=None): """Return the role ARN whose credentials are used to call the API. Throws an exception if Args: sagemaker_session(Session): Current sagemaker session Returns: (str): The role ARN """ if not sagemaker_session: sagemaker_sessi...
python
def get_execution_role(sagemaker_session=None): """Return the role ARN whose credentials are used to call the API. Throws an exception if Args: sagemaker_session(Session): Current sagemaker session Returns: (str): The role ARN """ if not sagemaker_session: sagemaker_sessi...
[ "def", "get_execution_role", "(", "sagemaker_session", "=", "None", ")", ":", "if", "not", "sagemaker_session", ":", "sagemaker_session", "=", "Session", "(", ")", "arn", "=", "sagemaker_session", ".", "get_caller_identity_arn", "(", ")", "if", "':role/'", "in", ...
Return the role ARN whose credentials are used to call the API. Throws an exception if Args: sagemaker_session(Session): Current sagemaker session Returns: (str): The role ARN
[ "Return", "the", "role", "ARN", "whose", "credentials", "are", "used", "to", "call", "the", "API", ".", "Throws", "an", "exception", "if", "Args", ":", "sagemaker_session", "(", "Session", ")", ":", "Current", "sagemaker", "session", "Returns", ":", "(", "...
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1297-L1312
train
Return the ARN whose credentials are used to call the API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session._initialize
def _initialize(self, boto_session, sagemaker_client, sagemaker_runtime_client): """Initialize this SageMaker Session. Creates or uses a boto_session, sagemaker_client and sagemaker_runtime_client. Sets the region_name. """ self.boto_session = boto_session or boto3.Session() ...
python
def _initialize(self, boto_session, sagemaker_client, sagemaker_runtime_client): """Initialize this SageMaker Session. Creates or uses a boto_session, sagemaker_client and sagemaker_runtime_client. Sets the region_name. """ self.boto_session = boto_session or boto3.Session() ...
[ "def", "_initialize", "(", "self", ",", "boto_session", ",", "sagemaker_client", ",", "sagemaker_runtime_client", ")", ":", "self", ".", "boto_session", "=", "boto_session", "or", "boto3", ".", "Session", "(", ")", "self", ".", "_region_name", "=", "self", "."...
Initialize this SageMaker Session. Creates or uses a boto_session, sagemaker_client and sagemaker_runtime_client. Sets the region_name.
[ "Initialize", "this", "SageMaker", "Session", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L89-L112
train
Initialize this SageMaker Session. Creates or uses a boto_session sagemaker_client and sagemaker_runtime_client Sets the region_name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.upload_data
def upload_data(self, path, bucket=None, key_prefix='data'): """Upload local file or directory to S3. If a single file is specified for upload, the resulting S3 object key is ``{key_prefix}/{filename}`` (filename does not include the local path, if any specified). If a directory is spe...
python
def upload_data(self, path, bucket=None, key_prefix='data'): """Upload local file or directory to S3. If a single file is specified for upload, the resulting S3 object key is ``{key_prefix}/{filename}`` (filename does not include the local path, if any specified). If a directory is spe...
[ "def", "upload_data", "(", "self", ",", "path", ",", "bucket", "=", "None", ",", "key_prefix", "=", "'data'", ")", ":", "# Generate a tuple for each file that we want to upload of the form (local_path, s3_key).", "files", "=", "[", "]", "key_suffix", "=", "None", "if"...
Upload local file or directory to S3. If a single file is specified for upload, the resulting S3 object key is ``{key_prefix}/{filename}`` (filename does not include the local path, if any specified). If a directory is specified for upload, the API uploads all content, recursively, pre...
[ "Upload", "local", "file", "or", "directory", "to", "S3", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L118-L169
train
Uploads a file or directory to the S3 bucket.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.default_bucket
def default_bucket(self): """Return the name of the default bucket to use in relevant Amazon SageMaker interactions. Returns: str: The name of the default bucket, which is of the form: ``sagemaker-{region}-{AWS account ID}``. """ if self._default_bucket: return s...
python
def default_bucket(self): """Return the name of the default bucket to use in relevant Amazon SageMaker interactions. Returns: str: The name of the default bucket, which is of the form: ``sagemaker-{region}-{AWS account ID}``. """ if self._default_bucket: return s...
[ "def", "default_bucket", "(", "self", ")", ":", "if", "self", ".", "_default_bucket", ":", "return", "self", ".", "_default_bucket", "account", "=", "self", ".", "boto_session", ".", "client", "(", "'sts'", ")", ".", "get_caller_identity", "(", ")", "[", "...
Return the name of the default bucket to use in relevant Amazon SageMaker interactions. Returns: str: The name of the default bucket, which is of the form: ``sagemaker-{region}-{AWS account ID}``.
[ "Return", "the", "name", "of", "the", "default", "bucket", "to", "use", "in", "relevant", "Amazon", "SageMaker", "interactions", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L171-L211
train
Return the name of the default bucket to use in relevant Amazon SageMaker interactions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.train
def train(self, input_mode, input_config, role, job_name, output_config, # noqa: C901 resource_config, vpc_config, hyperparameters, stop_condition, tags, metric_definitions, enable_network_isolation=False, image=None, algorithm_arn=None, encrypt_inter_container_traffic=False):...
python
def train(self, input_mode, input_config, role, job_name, output_config, # noqa: C901 resource_config, vpc_config, hyperparameters, stop_condition, tags, metric_definitions, enable_network_isolation=False, image=None, algorithm_arn=None, encrypt_inter_container_traffic=False):...
[ "def", "train", "(", "self", ",", "input_mode", ",", "input_config", ",", "role", ",", "job_name", ",", "output_config", ",", "# noqa: C901", "resource_config", ",", "vpc_config", ",", "hyperparameters", ",", "stop_condition", ",", "tags", ",", "metric_definitions...
Create an Amazon SageMaker training job. Args: input_mode (str): The input mode that the algorithm supports. Valid modes: * 'File' - Amazon SageMaker copies the training dataset from the S3 location to a directory in the Docker container. * 'Pipe...
[ "Create", "an", "Amazon", "SageMaker", "training", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L213-L317
train
Create an Amazon SageMaker training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.compile_model
def compile_model(self, input_model_config, output_model_config, role, job_name, stop_condition, tags): """Create an Amazon SageMaker Neo compilation job. Args: input_model_config (dict): the trained model and the Amazon S3 location where it is stored. outp...
python
def compile_model(self, input_model_config, output_model_config, role, job_name, stop_condition, tags): """Create an Amazon SageMaker Neo compilation job. Args: input_model_config (dict): the trained model and the Amazon S3 location where it is stored. outp...
[ "def", "compile_model", "(", "self", ",", "input_model_config", ",", "output_model_config", ",", "role", ",", "job_name", ",", "stop_condition", ",", "tags", ")", ":", "compilation_job_request", "=", "{", "'InputConfig'", ":", "input_model_config", ",", "'OutputConf...
Create an Amazon SageMaker Neo compilation job. Args: input_model_config (dict): the trained model and the Amazon S3 location where it is stored. output_model_config (dict): Identifies the Amazon S3 location where you want Amazon SageMaker Neo to save the results of comp...
[ "Create", "an", "Amazon", "SageMaker", "Neo", "compilation", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L319-L351
train
Create an Amazon SageMaker Neo compilation job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.tune
def tune(self, job_name, strategy, objective_type, objective_metric_name, max_jobs, max_parallel_jobs, parameter_ranges, static_hyperparameters, input_mode, metric_definitions, role, input_config, output_config, resource_config, stop_condition, tags, warm_start_config...
python
def tune(self, job_name, strategy, objective_type, objective_metric_name, max_jobs, max_parallel_jobs, parameter_ranges, static_hyperparameters, input_mode, metric_definitions, role, input_config, output_config, resource_config, stop_condition, tags, warm_start_config...
[ "def", "tune", "(", "self", ",", "job_name", ",", "strategy", ",", "objective_type", ",", "objective_metric_name", ",", "max_jobs", ",", "max_parallel_jobs", ",", "parameter_ranges", ",", "static_hyperparameters", ",", "input_mode", ",", "metric_definitions", ",", "...
Create an Amazon SageMaker hyperparameter tuning job Args: job_name (str): Name of the tuning job being created. strategy (str): Strategy to be used for hyperparameter estimations. objective_type (str): The type of the objective metric for evaluating training jobs. This valu...
[ "Create", "an", "Amazon", "SageMaker", "hyperparameter", "tuning", "job" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L353-L474
train
This method creates an Amazon SageMaker hyperparameter tuning job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.stop_tuning_job
def stop_tuning_job(self, name): """Stop the Amazon SageMaker hyperparameter tuning job with the specified name. Args: name (str): Name of the Amazon SageMaker hyperparameter tuning job. Raises: ClientError: If an error occurs while trying to stop the hyperparameter tun...
python
def stop_tuning_job(self, name): """Stop the Amazon SageMaker hyperparameter tuning job with the specified name. Args: name (str): Name of the Amazon SageMaker hyperparameter tuning job. Raises: ClientError: If an error occurs while trying to stop the hyperparameter tun...
[ "def", "stop_tuning_job", "(", "self", ",", "name", ")", ":", "try", ":", "LOGGER", ".", "info", "(", "'Stopping tuning job: {}'", ".", "format", "(", "name", ")", ")", "self", ".", "sagemaker_client", ".", "stop_hyper_parameter_tuning_job", "(", "HyperParameter...
Stop the Amazon SageMaker hyperparameter tuning job with the specified name. Args: name (str): Name of the Amazon SageMaker hyperparameter tuning job. Raises: ClientError: If an error occurs while trying to stop the hyperparameter tuning job.
[ "Stop", "the", "Amazon", "SageMaker", "hyperparameter", "tuning", "job", "with", "the", "specified", "name", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L476-L495
train
Stop the Amazon SageMaker hyperparameter tuning job with the specified name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.transform
def transform(self, job_name, model_name, strategy, max_concurrent_transforms, max_payload, env, input_config, output_config, resource_config, tags): """Create an Amazon SageMaker transform job. Args: job_name (str): Name of the transform job being created. mod...
python
def transform(self, job_name, model_name, strategy, max_concurrent_transforms, max_payload, env, input_config, output_config, resource_config, tags): """Create an Amazon SageMaker transform job. Args: job_name (str): Name of the transform job being created. mod...
[ "def", "transform", "(", "self", ",", "job_name", ",", "model_name", ",", "strategy", ",", "max_concurrent_transforms", ",", "max_payload", ",", "env", ",", "input_config", ",", "output_config", ",", "resource_config", ",", "tags", ")", ":", "transform_request", ...
Create an Amazon SageMaker transform job. Args: job_name (str): Name of the transform job being created. model_name (str): Name of the SageMaker model being used for the transform job. strategy (str): The strategy used to decide how to batch records in a single request. ...
[ "Create", "an", "Amazon", "SageMaker", "transform", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L497-L541
train
Create an Amazon SageMaker transform job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.create_model
def create_model(self, name, role, container_defs, vpc_config=None, enable_network_isolation=False, primary_container=None, tags=None): """Create an Amazon SageMaker ``Model``. Specify the S3 location of the model artifacts and Docker image containing th...
python
def create_model(self, name, role, container_defs, vpc_config=None, enable_network_isolation=False, primary_container=None, tags=None): """Create an Amazon SageMaker ``Model``. Specify the S3 location of the model artifacts and Docker image containing th...
[ "def", "create_model", "(", "self", ",", "name", ",", "role", ",", "container_defs", ",", "vpc_config", "=", "None", ",", "enable_network_isolation", "=", "False", ",", "primary_container", "=", "None", ",", "tags", "=", "None", ")", ":", "if", "container_de...
Create an Amazon SageMaker ``Model``. Specify the S3 location of the model artifacts and Docker image containing the inference code. Amazon SageMaker uses this information to deploy the model in Amazon SageMaker. This method can also be used to create a Model for an Inference Pipeline if...
[ "Create", "an", "Amazon", "SageMaker", "Model", ".", "Specify", "the", "S3", "location", "of", "the", "model", "artifacts", "and", "Docker", "image", "containing", "the", "inference", "code", ".", "Amazon", "SageMaker", "uses", "this", "information", "to", "de...
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L543-L620
train
Create an Amazon SageMaker Model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.create_model_from_job
def create_model_from_job(self, training_job_name, name=None, role=None, primary_container_image=None, model_data_url=None, env=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): """Create an Amazon SageMaker ``Model`` from a SageMaker Training Job. Args: ...
python
def create_model_from_job(self, training_job_name, name=None, role=None, primary_container_image=None, model_data_url=None, env=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): """Create an Amazon SageMaker ``Model`` from a SageMaker Training Job. Args: ...
[ "def", "create_model_from_job", "(", "self", ",", "training_job_name", ",", "name", "=", "None", ",", "role", "=", "None", ",", "primary_container_image", "=", "None", ",", "model_data_url", "=", "None", ",", "env", "=", "None", ",", "vpc_config_override", "="...
Create an Amazon SageMaker ``Model`` from a SageMaker Training Job. Args: training_job_name (str): The Amazon SageMaker Training Job name. name (str): The name of the SageMaker ``Model`` to create (default: None). If not specified, the training job name is used. ...
[ "Create", "an", "Amazon", "SageMaker", "Model", "from", "a", "SageMaker", "Training", "Job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L622-L654
train
Create an Amazon SageMaker Model from a SageMaker Training Job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.create_model_package_from_algorithm
def create_model_package_from_algorithm(self, name, description, algorithm_arn, model_data): """Create a SageMaker Model Package from the results of training with an Algorithm Package Args: name (str): ModelPackage name description (str): Model Package description al...
python
def create_model_package_from_algorithm(self, name, description, algorithm_arn, model_data): """Create a SageMaker Model Package from the results of training with an Algorithm Package Args: name (str): ModelPackage name description (str): Model Package description al...
[ "def", "create_model_package_from_algorithm", "(", "self", ",", "name", ",", "description", ",", "algorithm_arn", ",", "model_data", ")", ":", "request", "=", "{", "'ModelPackageName'", ":", "name", ",", "'ModelPackageDescription'", ":", "description", ",", "'Source...
Create a SageMaker Model Package from the results of training with an Algorithm Package Args: name (str): ModelPackage name description (str): Model Package description algorithm_arn (str): arn or name of the algorithm used for training. model_data (str): s3 URI ...
[ "Create", "a", "SageMaker", "Model", "Package", "from", "the", "results", "of", "training", "with", "an", "Algorithm", "Package" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L656-L690
train
Create a SageMaker Model Package from the results of training with an Algorithm Package
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.wait_for_model_package
def wait_for_model_package(self, model_package_name, poll=5): """Wait for an Amazon SageMaker endpoint deployment to complete. Args: endpoint (str): Name of the ``Endpoint`` to wait for. poll (int): Polling interval in seconds (default: 5). Returns: dict: Re...
python
def wait_for_model_package(self, model_package_name, poll=5): """Wait for an Amazon SageMaker endpoint deployment to complete. Args: endpoint (str): Name of the ``Endpoint`` to wait for. poll (int): Polling interval in seconds (default: 5). Returns: dict: Re...
[ "def", "wait_for_model_package", "(", "self", ",", "model_package_name", ",", "poll", "=", "5", ")", ":", "desc", "=", "_wait_until", "(", "lambda", ":", "_create_model_package_status", "(", "self", ".", "sagemaker_client", ",", "model_package_name", ")", ",", "...
Wait for an Amazon SageMaker endpoint deployment to complete. Args: endpoint (str): Name of the ``Endpoint`` to wait for. poll (int): Polling interval in seconds (default: 5). Returns: dict: Return value from the ``DescribeEndpoint`` API.
[ "Wait", "for", "an", "Amazon", "SageMaker", "endpoint", "deployment", "to", "complete", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L692-L710
train
Wait for an Amazon SageMaker model package to complete.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.create_endpoint_config
def create_endpoint_config(self, name, model_name, initial_instance_count, instance_type, accelerator_type=None, tags=None, kms_key=None): """Create an Amazon SageMaker endpoint configuration. The endpoint configuration identifies the Amazon SageMaker model (created using...
python
def create_endpoint_config(self, name, model_name, initial_instance_count, instance_type, accelerator_type=None, tags=None, kms_key=None): """Create an Amazon SageMaker endpoint configuration. The endpoint configuration identifies the Amazon SageMaker model (created using...
[ "def", "create_endpoint_config", "(", "self", ",", "name", ",", "model_name", ",", "initial_instance_count", ",", "instance_type", ",", "accelerator_type", "=", "None", ",", "tags", "=", "None", ",", "kms_key", "=", "None", ")", ":", "LOGGER", ".", "info", "...
Create an Amazon SageMaker endpoint configuration. The endpoint configuration identifies the Amazon SageMaker model (created using the ``CreateModel`` API) and the hardware configuration on which to deploy the model. Provide this endpoint configuration to the ``CreateEndpoint`` API, which then ...
[ "Create", "an", "Amazon", "SageMaker", "endpoint", "configuration", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L712-L756
train
Create an Amazon SageMaker endpoint - point configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.create_endpoint
def create_endpoint(self, endpoint_name, config_name, tags=None, wait=True): """Create an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request. Once the ``Endpoint`` is created, client applications can send requests to obtain inferences. The endpoint co...
python
def create_endpoint(self, endpoint_name, config_name, tags=None, wait=True): """Create an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request. Once the ``Endpoint`` is created, client applications can send requests to obtain inferences. The endpoint co...
[ "def", "create_endpoint", "(", "self", ",", "endpoint_name", ",", "config_name", ",", "tags", "=", "None", ",", "wait", "=", "True", ")", ":", "LOGGER", ".", "info", "(", "'Creating endpoint with name {}'", ".", "format", "(", "endpoint_name", ")", ")", "tag...
Create an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request. Once the ``Endpoint`` is created, client applications can send requests to obtain inferences. The endpoint configuration is created using the ``CreateEndpointConfig`` API. Args: ...
[ "Create", "an", "Amazon", "SageMaker", "Endpoint", "according", "to", "the", "endpoint", "configuration", "specified", "in", "the", "request", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L758-L779
train
Create an Amazon SageMaker Endpoint according to the endpoint configuration specified in the request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.update_endpoint
def update_endpoint(self, endpoint_name, endpoint_config_name): """ Update an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request Raise an error if endpoint with endpoint_name does not exist. Args: endpoint_name (str): Name of the Amazon S...
python
def update_endpoint(self, endpoint_name, endpoint_config_name): """ Update an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request Raise an error if endpoint with endpoint_name does not exist. Args: endpoint_name (str): Name of the Amazon S...
[ "def", "update_endpoint", "(", "self", ",", "endpoint_name", ",", "endpoint_config_name", ")", ":", "if", "not", "_deployment_entity_exists", "(", "lambda", ":", "self", ".", "sagemaker_client", ".", "describe_endpoint", "(", "EndpointName", "=", "endpoint_name", ")...
Update an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request Raise an error if endpoint with endpoint_name does not exist. Args: endpoint_name (str): Name of the Amazon SageMaker ``Endpoint`` to update. endpoint_config_name (str): Nam...
[ "Update", "an", "Amazon", "SageMaker", "Endpoint", "according", "to", "the", "endpoint", "configuration", "specified", "in", "the", "request" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L781-L799
train
Update an Amazon SageMaker endpoint according to the endpoint configuration specified in the request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.delete_endpoint
def delete_endpoint(self, endpoint_name): """Delete an Amazon SageMaker ``Endpoint``. Args: endpoint_name (str): Name of the Amazon SageMaker ``Endpoint`` to delete. """ LOGGER.info('Deleting endpoint with name: {}'.format(endpoint_name)) self.sagemaker_client.delete...
python
def delete_endpoint(self, endpoint_name): """Delete an Amazon SageMaker ``Endpoint``. Args: endpoint_name (str): Name of the Amazon SageMaker ``Endpoint`` to delete. """ LOGGER.info('Deleting endpoint with name: {}'.format(endpoint_name)) self.sagemaker_client.delete...
[ "def", "delete_endpoint", "(", "self", ",", "endpoint_name", ")", ":", "LOGGER", ".", "info", "(", "'Deleting endpoint with name: {}'", ".", "format", "(", "endpoint_name", ")", ")", "self", ".", "sagemaker_client", ".", "delete_endpoint", "(", "EndpointName", "="...
Delete an Amazon SageMaker ``Endpoint``. Args: endpoint_name (str): Name of the Amazon SageMaker ``Endpoint`` to delete.
[ "Delete", "an", "Amazon", "SageMaker", "Endpoint", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L801-L808
train
Delete an Amazon SageMaker Endpoint.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.delete_endpoint_config
def delete_endpoint_config(self, endpoint_config_name): """Delete an Amazon SageMaker endpoint configuration. Args: endpoint_config_name (str): Name of the Amazon SageMaker endpoint configuration to delete. """ LOGGER.info('Deleting endpoint configuration with name: {}'.form...
python
def delete_endpoint_config(self, endpoint_config_name): """Delete an Amazon SageMaker endpoint configuration. Args: endpoint_config_name (str): Name of the Amazon SageMaker endpoint configuration to delete. """ LOGGER.info('Deleting endpoint configuration with name: {}'.form...
[ "def", "delete_endpoint_config", "(", "self", ",", "endpoint_config_name", ")", ":", "LOGGER", ".", "info", "(", "'Deleting endpoint configuration with name: {}'", ".", "format", "(", "endpoint_config_name", ")", ")", "self", ".", "sagemaker_client", ".", "delete_endpoi...
Delete an Amazon SageMaker endpoint configuration. Args: endpoint_config_name (str): Name of the Amazon SageMaker endpoint configuration to delete.
[ "Delete", "an", "Amazon", "SageMaker", "endpoint", "configuration", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L810-L817
train
Delete an Amazon SageMaker endpoint configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.delete_model
def delete_model(self, model_name): """Delete an Amazon SageMaker Model. Args: model_name (str): Name of the Amazon SageMaker model to delete. """ LOGGER.info('Deleting model with name: {}'.format(model_name)) self.sagemaker_client.delete_model(ModelName=model_name)
python
def delete_model(self, model_name): """Delete an Amazon SageMaker Model. Args: model_name (str): Name of the Amazon SageMaker model to delete. """ LOGGER.info('Deleting model with name: {}'.format(model_name)) self.sagemaker_client.delete_model(ModelName=model_name)
[ "def", "delete_model", "(", "self", ",", "model_name", ")", ":", "LOGGER", ".", "info", "(", "'Deleting model with name: {}'", ".", "format", "(", "model_name", ")", ")", "self", ".", "sagemaker_client", ".", "delete_model", "(", "ModelName", "=", "model_name", ...
Delete an Amazon SageMaker Model. Args: model_name (str): Name of the Amazon SageMaker model to delete.
[ "Delete", "an", "Amazon", "SageMaker", "Model", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L819-L827
train
Delete an Amazon SageMaker Model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.wait_for_job
def wait_for_job(self, job, poll=5): """Wait for an Amazon SageMaker training job to complete. Args: job (str): Name of the training job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``DescribeTrain...
python
def wait_for_job(self, job, poll=5): """Wait for an Amazon SageMaker training job to complete. Args: job (str): Name of the training job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``DescribeTrain...
[ "def", "wait_for_job", "(", "self", ",", "job", ",", "poll", "=", "5", ")", ":", "desc", "=", "_wait_until_training_done", "(", "lambda", "last_desc", ":", "_train_done", "(", "self", ".", "sagemaker_client", ",", "job", ",", "last_desc", ")", ",", "None",...
Wait for an Amazon SageMaker training job to complete. Args: job (str): Name of the training job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``DescribeTrainingJob`` API. Raises: Value...
[ "Wait", "for", "an", "Amazon", "SageMaker", "training", "job", "to", "complete", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L829-L845
train
Wait for an Amazon SageMaker training job to complete.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.wait_for_compilation_job
def wait_for_compilation_job(self, job, poll=5): """Wait for an Amazon SageMaker Neo compilation job to complete. Args: job (str): Name of the compilation job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value fr...
python
def wait_for_compilation_job(self, job, poll=5): """Wait for an Amazon SageMaker Neo compilation job to complete. Args: job (str): Name of the compilation job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value fr...
[ "def", "wait_for_compilation_job", "(", "self", ",", "job", ",", "poll", "=", "5", ")", ":", "desc", "=", "_wait_until", "(", "lambda", ":", "_compilation_job_status", "(", "self", ".", "sagemaker_client", ",", "job", ")", ",", "poll", ")", "self", ".", ...
Wait for an Amazon SageMaker Neo compilation job to complete. Args: job (str): Name of the compilation job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``DescribeCompilationJob`` API. Raises: ...
[ "Wait", "for", "an", "Amazon", "SageMaker", "Neo", "compilation", "job", "to", "complete", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L847-L862
train
Wait for an Amazon SageMaker Neo compilation job to complete.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.wait_for_tuning_job
def wait_for_tuning_job(self, job, poll=5): """Wait for an Amazon SageMaker hyperparameter tuning job to complete. Args: job (str): Name of the tuning job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from t...
python
def wait_for_tuning_job(self, job, poll=5): """Wait for an Amazon SageMaker hyperparameter tuning job to complete. Args: job (str): Name of the tuning job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from t...
[ "def", "wait_for_tuning_job", "(", "self", ",", "job", ",", "poll", "=", "5", ")", ":", "desc", "=", "_wait_until", "(", "lambda", ":", "_tuning_job_status", "(", "self", ".", "sagemaker_client", ",", "job", ")", ",", "poll", ")", "self", ".", "_check_jo...
Wait for an Amazon SageMaker hyperparameter tuning job to complete. Args: job (str): Name of the tuning job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``DescribeHyperParameterTuningJob`` API. Ra...
[ "Wait", "for", "an", "Amazon", "SageMaker", "hyperparameter", "tuning", "job", "to", "complete", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L864-L879
train
Wait for an Amazon SageMaker hyperparameter tuning job to complete.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.wait_for_transform_job
def wait_for_transform_job(self, job, poll=5): """Wait for an Amazon SageMaker transform job to complete. Args: job (str): Name of the transform job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``D...
python
def wait_for_transform_job(self, job, poll=5): """Wait for an Amazon SageMaker transform job to complete. Args: job (str): Name of the transform job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``D...
[ "def", "wait_for_transform_job", "(", "self", ",", "job", ",", "poll", "=", "5", ")", ":", "desc", "=", "_wait_until", "(", "lambda", ":", "_transform_job_status", "(", "self", ".", "sagemaker_client", ",", "job", ")", ",", "poll", ")", "self", ".", "_ch...
Wait for an Amazon SageMaker transform job to complete. Args: job (str): Name of the transform job to wait for. poll (int): Polling interval in seconds (default: 5). Returns: (dict): Return value from the ``DescribeTransformJob`` API. Raises: Va...
[ "Wait", "for", "an", "Amazon", "SageMaker", "transform", "job", "to", "complete", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L881-L896
train
Wait for an Amazon SageMaker transform job to complete.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session._check_job_status
def _check_job_status(self, job, desc, status_key_name): """Check to see if the job completed successfully and, if not, construct and raise a ValueError. Args: job (str): The name of the job to check. desc (dict[str, str]): The result of ``describe_training_job()``. ...
python
def _check_job_status(self, job, desc, status_key_name): """Check to see if the job completed successfully and, if not, construct and raise a ValueError. Args: job (str): The name of the job to check. desc (dict[str, str]): The result of ``describe_training_job()``. ...
[ "def", "_check_job_status", "(", "self", ",", "job", ",", "desc", ",", "status_key_name", ")", ":", "status", "=", "desc", "[", "status_key_name", "]", "# If the status is capital case, then convert it to Camel case", "status", "=", "_STATUS_CODE_TABLE", ".", "get", "...
Check to see if the job completed successfully and, if not, construct and raise a ValueError. Args: job (str): The name of the job to check. desc (dict[str, str]): The result of ``describe_training_job()``. status_key_name (str): Status key name to check for. ...
[ "Check", "to", "see", "if", "the", "job", "completed", "successfully", "and", "if", "not", "construct", "and", "raise", "a", "ValueError", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L898-L917
train
Check to see if the job completed successfully and if not construct and class instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.wait_for_endpoint
def wait_for_endpoint(self, endpoint, poll=5): """Wait for an Amazon SageMaker endpoint deployment to complete. Args: endpoint (str): Name of the ``Endpoint`` to wait for. poll (int): Polling interval in seconds (default: 5). Returns: dict: Return value from...
python
def wait_for_endpoint(self, endpoint, poll=5): """Wait for an Amazon SageMaker endpoint deployment to complete. Args: endpoint (str): Name of the ``Endpoint`` to wait for. poll (int): Polling interval in seconds (default: 5). Returns: dict: Return value from...
[ "def", "wait_for_endpoint", "(", "self", ",", "endpoint", ",", "poll", "=", "5", ")", ":", "desc", "=", "_wait_until", "(", "lambda", ":", "_deploy_done", "(", "self", ".", "sagemaker_client", ",", "endpoint", ")", ",", "poll", ")", "status", "=", "desc"...
Wait for an Amazon SageMaker endpoint deployment to complete. Args: endpoint (str): Name of the ``Endpoint`` to wait for. poll (int): Polling interval in seconds (default: 5). Returns: dict: Return value from the ``DescribeEndpoint`` API.
[ "Wait", "for", "an", "Amazon", "SageMaker", "endpoint", "deployment", "to", "complete", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L919-L935
train
Wait for an Amazon SageMaker endpoint deployment to complete.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.endpoint_from_job
def endpoint_from_job(self, job_name, initial_instance_count, instance_type, deployment_image=None, name=None, role=None, wait=True, model_environment_vars=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, accelerator_type=None): ...
python
def endpoint_from_job(self, job_name, initial_instance_count, instance_type, deployment_image=None, name=None, role=None, wait=True, model_environment_vars=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, accelerator_type=None): ...
[ "def", "endpoint_from_job", "(", "self", ",", "job_name", ",", "initial_instance_count", ",", "instance_type", ",", "deployment_image", "=", "None", ",", "name", "=", "None", ",", "role", "=", "None", ",", "wait", "=", "True", ",", "model_environment_vars", "=...
Create an ``Endpoint`` using the results of a successful training job. Specify the job name, Docker image containing the inference code, and hardware configuration to deploy the model. Internally the API, creates an Amazon SageMaker model (that describes the model artifacts and the Docker image...
[ "Create", "an", "Endpoint", "using", "the", "results", "of", "a", "successful", "training", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L937-L985
train
Create an endpoint from the results of a successful training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.endpoint_from_model_data
def endpoint_from_model_data(self, model_s3_location, deployment_image, initial_instance_count, instance_type, name=None, role=None, wait=True, model_environment_vars=None, model_vpc_config=None, accelerator_type=None): """Create and deploy to an...
python
def endpoint_from_model_data(self, model_s3_location, deployment_image, initial_instance_count, instance_type, name=None, role=None, wait=True, model_environment_vars=None, model_vpc_config=None, accelerator_type=None): """Create and deploy to an...
[ "def", "endpoint_from_model_data", "(", "self", ",", "model_s3_location", ",", "deployment_image", ",", "initial_instance_count", ",", "instance_type", ",", "name", "=", "None", ",", "role", "=", "None", ",", "wait", "=", "True", ",", "model_environment_vars", "="...
Create and deploy to an ``Endpoint`` using existing model data stored in S3. Args: model_s3_location (str): S3 URI of the model artifacts to use for the endpoint. deployment_image (str): The Docker image which defines the runtime code to be used as the entry point for ac...
[ "Create", "and", "deploy", "to", "an", "Endpoint", "using", "existing", "model", "data", "stored", "in", "S3", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L987-L1042
train
Create and deploy an endpoint using existing model data stored in S3.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.endpoint_from_production_variants
def endpoint_from_production_variants(self, name, production_variants, tags=None, kms_key=None, wait=True): """Create an SageMaker ``Endpoint`` from a list of production variants. Args: name (str): The name of the ``Endpoint`` to create. production_variants (list[dict[str, str]]...
python
def endpoint_from_production_variants(self, name, production_variants, tags=None, kms_key=None, wait=True): """Create an SageMaker ``Endpoint`` from a list of production variants. Args: name (str): The name of the ``Endpoint`` to create. production_variants (list[dict[str, str]]...
[ "def", "endpoint_from_production_variants", "(", "self", ",", "name", ",", "production_variants", ",", "tags", "=", "None", ",", "kms_key", "=", "None", ",", "wait", "=", "True", ")", ":", "if", "not", "_deployment_entity_exists", "(", "lambda", ":", "self", ...
Create an SageMaker ``Endpoint`` from a list of production variants. Args: name (str): The name of the ``Endpoint`` to create. production_variants (list[dict[str, str]]): The list of production variants to deploy. tags (list[dict[str, str]]): A list of key-value pairs for ta...
[ "Create", "an", "SageMaker", "Endpoint", "from", "a", "list", "of", "production", "variants", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1044-L1068
train
Create an SageMaker Endpoint from a list of production variants.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.expand_role
def expand_role(self, role): """Expand an IAM role name into an ARN. If the role is already in the form of an ARN, then the role is simply returned. Otherwise we retrieve the full ARN and return it. Args: role (str): An AWS IAM role (either name or full ARN). Retur...
python
def expand_role(self, role): """Expand an IAM role name into an ARN. If the role is already in the form of an ARN, then the role is simply returned. Otherwise we retrieve the full ARN and return it. Args: role (str): An AWS IAM role (either name or full ARN). Retur...
[ "def", "expand_role", "(", "self", ",", "role", ")", ":", "if", "'/'", "in", "role", ":", "return", "role", "else", ":", "return", "self", ".", "boto_session", ".", "resource", "(", "'iam'", ")", ".", "Role", "(", "role", ")", ".", "arn" ]
Expand an IAM role name into an ARN. If the role is already in the form of an ARN, then the role is simply returned. Otherwise we retrieve the full ARN and return it. Args: role (str): An AWS IAM role (either name or full ARN). Returns: str: The corresponding A...
[ "Expand", "an", "IAM", "role", "name", "into", "an", "ARN", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1070-L1085
train
Expand an IAM role name into an ARN.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.get_caller_identity_arn
def get_caller_identity_arn(self): """Returns the ARN user or role whose credentials are used to call the API. Returns: (str): The ARN user or role """ assumed_role = self.boto_session.client('sts').get_caller_identity()['Arn'] if 'AmazonSageMaker-ExecutionRole' in a...
python
def get_caller_identity_arn(self): """Returns the ARN user or role whose credentials are used to call the API. Returns: (str): The ARN user or role """ assumed_role = self.boto_session.client('sts').get_caller_identity()['Arn'] if 'AmazonSageMaker-ExecutionRole' in a...
[ "def", "get_caller_identity_arn", "(", "self", ")", ":", "assumed_role", "=", "self", ".", "boto_session", ".", "client", "(", "'sts'", ")", ".", "get_caller_identity", "(", ")", "[", "'Arn'", "]", "if", "'AmazonSageMaker-ExecutionRole'", "in", "assumed_role", "...
Returns the ARN user or role whose credentials are used to call the API. Returns: (str): The ARN user or role
[ "Returns", "the", "ARN", "user", "or", "role", "whose", "credentials", "are", "used", "to", "call", "the", "API", ".", "Returns", ":", "(", "str", ")", ":", "The", "ARN", "user", "or", "role" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1087-L1108
train
Returns the ARN user or role whose credentials are used to call the API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/session.py
Session.logs_for_job
def logs_for_job(self, job_name, wait=False, poll=10): # noqa: C901 - suppress complexity warning for this method """Display the logs for a given training job, optionally tailing them until the job is complete. If the output is a tty or a Jupyter cell, it will be color-coded based on which inst...
python
def logs_for_job(self, job_name, wait=False, poll=10): # noqa: C901 - suppress complexity warning for this method """Display the logs for a given training job, optionally tailing them until the job is complete. If the output is a tty or a Jupyter cell, it will be color-coded based on which inst...
[ "def", "logs_for_job", "(", "self", ",", "job_name", ",", "wait", "=", "False", ",", "poll", "=", "10", ")", ":", "# noqa: C901 - suppress complexity warning for this method", "description", "=", "self", ".", "sagemaker_client", ".", "describe_training_job", "(", "T...
Display the logs for a given training job, optionally tailing them until the job is complete. If the output is a tty or a Jupyter cell, it will be color-coded based on which instance the log entry is from. Args: job_name (str): Name of the training job to display the logs for. ...
[ "Display", "the", "logs", "for", "a", "given", "training", "job", "optionally", "tailing", "them", "until", "the", "job", "is", "complete", ".", "If", "the", "output", "is", "a", "tty", "or", "a", "Jupyter", "cell", "it", "will", "be", "color", "-", "c...
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/session.py#L1110-L1226
train
Display the logs for a given training job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/fw_registry.py
registry
def registry(region_name, framework=None): """ Return docker registry for the given AWS region for the given framework. This is only used for SparkML and Scikit-learn for now. """ try: account_id = image_registry_map[region_name][framework] return get_ecr_image_uri_prefix(account_id,...
python
def registry(region_name, framework=None): """ Return docker registry for the given AWS region for the given framework. This is only used for SparkML and Scikit-learn for now. """ try: account_id = image_registry_map[region_name][framework] return get_ecr_image_uri_prefix(account_id,...
[ "def", "registry", "(", "region_name", ",", "framework", "=", "None", ")", ":", "try", ":", "account_id", "=", "image_registry_map", "[", "region_name", "]", "[", "framework", "]", "return", "get_ecr_image_uri_prefix", "(", "account_id", ",", "region_name", ")",...
Return docker registry for the given AWS region for the given framework. This is only used for SparkML and Scikit-learn for now.
[ "Return", "docker", "registry", "for", "the", "given", "AWS", "region", "for", "the", "given", "framework", ".", "This", "is", "only", "used", "for", "SparkML", "and", "Scikit", "-", "learn", "for", "now", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/fw_registry.py#L82-L92
train
Returns the docker registry for the given AWS region.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/amazon/knn.py
KNN.create_model
def create_model(self, vpc_config_override=VPC_CONFIG_DEFAULT): """Return a :class:`~sagemaker.amazon.KNNModel` referencing the latest s3 model data produced by this Estimator. Args: vpc_config_override (dict[str, list[str]]): Optional override for VpcConfig set on the model. ...
python
def create_model(self, vpc_config_override=VPC_CONFIG_DEFAULT): """Return a :class:`~sagemaker.amazon.KNNModel` referencing the latest s3 model data produced by this Estimator. Args: vpc_config_override (dict[str, list[str]]): Optional override for VpcConfig set on the model. ...
[ "def", "create_model", "(", "self", ",", "vpc_config_override", "=", "VPC_CONFIG_DEFAULT", ")", ":", "return", "KNNModel", "(", "self", ".", "model_data", ",", "self", ".", "role", ",", "sagemaker_session", "=", "self", ".", "sagemaker_session", ",", "vpc_config...
Return a :class:`~sagemaker.amazon.KNNModel` referencing the latest s3 model data produced by this Estimator. Args: vpc_config_override (dict[str, list[str]]): Optional override for VpcConfig set on the model. Default: use subnets and security groups from this Estimator. ...
[ "Return", "a", ":", "class", ":", "~sagemaker", ".", "amazon", ".", "KNNModel", "referencing", "the", "latest", "s3", "model", "data", "produced", "by", "this", "Estimator", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/amazon/knn.py#L102-L113
train
Create a KNNModel referencing the latest KNN .
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/local/utils.py
copy_directory_structure
def copy_directory_structure(destination_directory, relative_path): """Create all the intermediate directories required for relative_path to exist within destination_directory. This assumes that relative_path is a directory located within root_dir. Examples: destination_directory: /tmp/destination ...
python
def copy_directory_structure(destination_directory, relative_path): """Create all the intermediate directories required for relative_path to exist within destination_directory. This assumes that relative_path is a directory located within root_dir. Examples: destination_directory: /tmp/destination ...
[ "def", "copy_directory_structure", "(", "destination_directory", ",", "relative_path", ")", ":", "full_path", "=", "os", ".", "path", ".", "join", "(", "destination_directory", ",", "relative_path", ")", "if", "os", ".", "path", ".", "exists", "(", "full_path", ...
Create all the intermediate directories required for relative_path to exist within destination_directory. This assumes that relative_path is a directory located within root_dir. Examples: destination_directory: /tmp/destination relative_path: test/unit/ will create: /tmp/destination/t...
[ "Create", "all", "the", "intermediate", "directories", "required", "for", "relative_path", "to", "exist", "within", "destination_directory", ".", "This", "assumes", "that", "relative_path", "is", "a", "directory", "located", "within", "root_dir", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/local/utils.py#L22-L40
train
Create all the intermediate directories required for relative_path to exist within destination_directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/local/utils.py
move_to_destination
def move_to_destination(source, destination, job_name, sagemaker_session): """move source to destination. Can handle uploading to S3 Args: source (str): root directory to move destination (str): file:// or s3:// URI that source will be moved to. job_name (str): SageMaker job name. ...
python
def move_to_destination(source, destination, job_name, sagemaker_session): """move source to destination. Can handle uploading to S3 Args: source (str): root directory to move destination (str): file:// or s3:// URI that source will be moved to. job_name (str): SageMaker job name. ...
[ "def", "move_to_destination", "(", "source", ",", "destination", ",", "job_name", ",", "sagemaker_session", ")", ":", "parsed_uri", "=", "urlparse", "(", "destination", ")", "if", "parsed_uri", ".", "scheme", "==", "'file'", ":", "recursive_copy", "(", "source",...
move source to destination. Can handle uploading to S3 Args: source (str): root directory to move destination (str): file:// or s3:// URI that source will be moved to. job_name (str): SageMaker job name. sagemaker_session (sagemaker.Session): a sagemaker_session to interact with S3 ...
[ "move", "source", "to", "destination", ".", "Can", "handle", "uploading", "to", "S3" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/local/utils.py#L43-L68
train
Move source to destination. Can handle uploading to S3 or file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/local/utils.py
recursive_copy
def recursive_copy(source, destination): """A wrapper around distutils.dir_util.copy_tree but won't throw any exception when the source directory does not exist. Args: source (str): source path destination (str): destination path """ if os.path.isdir(source): copy_tree(sourc...
python
def recursive_copy(source, destination): """A wrapper around distutils.dir_util.copy_tree but won't throw any exception when the source directory does not exist. Args: source (str): source path destination (str): destination path """ if os.path.isdir(source): copy_tree(sourc...
[ "def", "recursive_copy", "(", "source", ",", "destination", ")", ":", "if", "os", ".", "path", ".", "isdir", "(", "source", ")", ":", "copy_tree", "(", "source", ",", "destination", ")" ]
A wrapper around distutils.dir_util.copy_tree but won't throw any exception when the source directory does not exist. Args: source (str): source path destination (str): destination path
[ "A", "wrapper", "around", "distutils", ".", "dir_util", ".", "copy_tree", "but", "won", "t", "throw", "any", "exception", "when", "the", "source", "directory", "does", "not", "exist", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/local/utils.py#L71-L80
train
A wrapper around distutils. dir_util. copy_tree but won t throw any exception when the source directory does not exist.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/mxnet/estimator.py
MXNet._prepare_init_params_from_job_description
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
python
def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None): """Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_n...
[ "def", "_prepare_init_params_from_job_description", "(", "cls", ",", "job_details", ",", "model_channel_name", "=", "None", ")", ":", "init_params", "=", "super", "(", "MXNet", ",", "cls", ")", ".", "_prepare_init_params_from_job_description", "(", "job_details", ",",...
Convert the job description to init params that can be handled by the class constructor Args: job_details: the returned job details from a describe_training_job API call. model_channel_name (str): Name of the channel where pre-trained model data will be downloaded. Returns: ...
[ "Convert", "the", "job", "description", "to", "init", "params", "that", "can", "be", "handled", "by", "the", "class", "constructor" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/mxnet/estimator.py#L123-L157
train
Convert the job description to init params that can be handled by the class constructor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/transformer.py
Transformer.transform
def transform(self, data, data_type='S3Prefix', content_type=None, compression_type=None, split_type=None, job_name=None): """Start a new transform job. Args: data (str): Input data location in S3. data_type (str): What the S3 location defines (default: 'S3Pref...
python
def transform(self, data, data_type='S3Prefix', content_type=None, compression_type=None, split_type=None, job_name=None): """Start a new transform job. Args: data (str): Input data location in S3. data_type (str): What the S3 location defines (default: 'S3Pref...
[ "def", "transform", "(", "self", ",", "data", ",", "data_type", "=", "'S3Prefix'", ",", "content_type", "=", "None", ",", "compression_type", "=", "None", ",", "split_type", "=", "None", ",", "job_name", "=", "None", ")", ":", "local_mode", "=", "self", ...
Start a new transform job. Args: data (str): Input data location in S3. data_type (str): What the S3 location defines (default: 'S3Prefix'). Valid values: * 'S3Prefix' - the S3 URI defines a key name prefix. All objects with this prefix will be used as ...
[ "Start", "a", "new", "transform", "job", "." ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/transformer.py#L81-L115
train
Start a new transform job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/transformer.py
Transformer.attach
def attach(cls, transform_job_name, sagemaker_session=None): """Attach an existing transform job to a new Transformer instance Args: transform_job_name (str): Name for the transform job to be attached. sagemaker_session (sagemaker.session.Session): Session object which manages i...
python
def attach(cls, transform_job_name, sagemaker_session=None): """Attach an existing transform job to a new Transformer instance Args: transform_job_name (str): Name for the transform job to be attached. sagemaker_session (sagemaker.session.Session): Session object which manages i...
[ "def", "attach", "(", "cls", ",", "transform_job_name", ",", "sagemaker_session", "=", "None", ")", ":", "sagemaker_session", "=", "sagemaker_session", "or", "Session", "(", ")", "job_details", "=", "sagemaker_session", ".", "sagemaker_client", ".", "describe_transf...
Attach an existing transform job to a new Transformer instance Args: transform_job_name (str): Name for the transform job to be attached. sagemaker_session (sagemaker.session.Session): Session object which manages interactions with Amazon SageMaker APIs and any other AWS...
[ "Attach", "an", "existing", "transform", "job", "to", "a", "new", "Transformer", "instance" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/transformer.py#L142-L163
train
Attach an existing transform job to a new Transformer instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
aws/sagemaker-python-sdk
src/sagemaker/transformer.py
Transformer._prepare_init_params_from_job_description
def _prepare_init_params_from_job_description(cls, job_details): """Convert the transform job description to init params that can be handled by the class constructor Args: job_details (dict): the returned job details from a describe_transform_job API call. Returns: dict...
python
def _prepare_init_params_from_job_description(cls, job_details): """Convert the transform job description to init params that can be handled by the class constructor Args: job_details (dict): the returned job details from a describe_transform_job API call. Returns: dict...
[ "def", "_prepare_init_params_from_job_description", "(", "cls", ",", "job_details", ")", ":", "init_params", "=", "dict", "(", ")", "init_params", "[", "'model_name'", "]", "=", "job_details", "[", "'ModelName'", "]", "init_params", "[", "'instance_count'", "]", "...
Convert the transform job description to init params that can be handled by the class constructor Args: job_details (dict): the returned job details from a describe_transform_job API call. Returns: dict: The transformed init_params
[ "Convert", "the", "transform", "job", "description", "to", "init", "params", "that", "can", "be", "handled", "by", "the", "class", "constructor" ]
a9e724c7d3f5572b68c3903548c792a59d99799a
https://github.com/aws/sagemaker-python-sdk/blob/a9e724c7d3f5572b68c3903548c792a59d99799a/src/sagemaker/transformer.py#L166-L190
train
Convert the transform job description to init params that can be handled by the class constructor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
piece_size
def piece_size(model_file=None, model_proto=None, name=None): """Returns the piece size (vocabulary size). Args: model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argume...
python
def piece_size(model_file=None, model_proto=None, name=None): """Returns the piece size (vocabulary size). Args: model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argume...
[ "def", "piece_size", "(", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_get_piece_size", "(", "model_file", "=", "model_file", ",", "model_proto", "=...
Returns the piece size (vocabulary size). Args: model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argument that is passed to the op function. Returns: A scalar repre...
[ "Returns", "the", "piece", "size", "(", "vocabulary", "size", ")", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L46-L59
train
Returns the piece size.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
piece_to_id
def piece_to_id(input, model_file=None, model_proto=None, name=None): """Converts piece into vocabulary id. Args: input: An arbitrary tensor of string. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_pr...
python
def piece_to_id(input, model_file=None, model_proto=None, name=None): """Converts piece into vocabulary id. Args: input: An arbitrary tensor of string. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_pr...
[ "def", "piece_to_id", "(", "input", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_piece_to_id", "(", "input", ",", "model_file", "=", "model_f...
Converts piece into vocabulary id. Args: input: An arbitrary tensor of string. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argument that is passed to the op func...
[ "Converts", "piece", "into", "vocabulary", "id", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L62-L76
train
Converts a piece into vocabulary id.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
id_to_piece
def id_to_piece(input, model_file=None, model_proto=None, name=None): """Converts vocabulary id into piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_pro...
python
def id_to_piece(input, model_file=None, model_proto=None, name=None): """Converts vocabulary id into piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_pro...
[ "def", "id_to_piece", "(", "input", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_id_to_piece", "(", "input", ",", "model_file", "=", "model_f...
Converts vocabulary id into piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argument that is passed to the op funct...
[ "Converts", "vocabulary", "id", "into", "piece", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L79-L93
train
Converts vocabulary id into piece.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
is_unknown
def is_unknown(input, model_file=None, model_proto=None, name=None): """Returns true if input id is unknown piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `mo...
python
def is_unknown(input, model_file=None, model_proto=None, name=None): """Returns true if input id is unknown piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `mo...
[ "def", "is_unknown", "(", "input", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_get_piece_type", "(", "input", ",", "model_file", "=", "model...
Returns true if input id is unknown piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argument that is passed to the ...
[ "Returns", "true", "if", "input", "id", "is", "unknown", "piece", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L96-L111
train
Returns true if input id is unknown piece.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
is_control
def is_control(input, model_file=None, model_proto=None, name=None): """Returns true if input id is control piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `mo...
python
def is_control(input, model_file=None, model_proto=None, name=None): """Returns true if input id is control piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `mo...
[ "def", "is_control", "(", "input", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_get_piece_type", "(", "input", ",", "model_file", "=", "model...
Returns true if input id is control piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argument that is passed to the ...
[ "Returns", "true", "if", "input", "id", "is", "control", "piece", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L114-L129
train
Returns true if input id is control piece.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
is_unused
def is_unused(input, model_file=None, model_proto=None, name=None): """Returns true if input id is unused piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `mode...
python
def is_unused(input, model_file=None, model_proto=None, name=None): """Returns true if input id is unused piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `mode...
[ "def", "is_unused", "(", "input", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_get_piece_type", "(", "input", ",", "model_file", "=", "model_...
Returns true if input id is unused piece. Args: input: An arbitrary tensor of int32. model_file: The sentencepiece model file path. model_proto: The sentencepiece model serialized proto. Either `model_file` or `model_proto` must be set. name: The name argument that is passed to the o...
[ "Returns", "true", "if", "input", "id", "is", "unused", "piece", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L132-L147
train
Returns true if input id is unused piece.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
encode_dense
def encode_dense(input_sentences, nbest_size=0, alpha=1.0, model_file=None, model_proto=None, reverse=False, add_bos=False, add_eos=False, out_type=tf.int32, name=None): """Encodes sentences into pieces in dense tensor format. Args: input_sentences: A 1D strin...
python
def encode_dense(input_sentences, nbest_size=0, alpha=1.0, model_file=None, model_proto=None, reverse=False, add_bos=False, add_eos=False, out_type=tf.int32, name=None): """Encodes sentences into pieces in dense tensor format. Args: input_sentences: A 1D strin...
[ "def", "encode_dense", "(", "input_sentences", ",", "nbest_size", "=", "0", ",", "alpha", "=", "1.0", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "reverse", "=", "False", ",", "add_bos", "=", "False", ",", "add_eos", "=", "False...
Encodes sentences into pieces in dense tensor format. Args: input_sentences: A 1D string tensor of arbitrary size holding the raw text of input sentences. nbest_size: A scalar or 1D tensor for sampling. nbest_size = {0,1}: No sampling is performed. nbest_s...
[ "Encodes", "sentences", "into", "pieces", "in", "dense", "tensor", "format", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L150-L186
train
Encodes sentences into pieces in dense format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
encode_sparse
def encode_sparse(input_sentences, nbest_size=0, alpha=1.0, model_file=None, model_proto=None, reverse=False, add_bos=False, add_eos=False, out_type=tf.int32, name=None): """Encodes sentences into pieces in sparse tensor format. Args: input_sentences: A 1D ...
python
def encode_sparse(input_sentences, nbest_size=0, alpha=1.0, model_file=None, model_proto=None, reverse=False, add_bos=False, add_eos=False, out_type=tf.int32, name=None): """Encodes sentences into pieces in sparse tensor format. Args: input_sentences: A 1D ...
[ "def", "encode_sparse", "(", "input_sentences", ",", "nbest_size", "=", "0", ",", "alpha", "=", "1.0", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "reverse", "=", "False", ",", "add_bos", "=", "False", ",", "add_eos", "=", "Fals...
Encodes sentences into pieces in sparse tensor format. Args: input_sentences: A 1D string tensor of arbitrary size holding the raw text of input sentences. nbest_size: A scalar or 1D tensor for sampling. nbest_size = {0,1}: No sampling is performed. nbest_...
[ "Encodes", "sentences", "into", "pieces", "in", "sparse", "tensor", "format", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L189-L227
train
Encodes sentences into pieces in sparse tensor format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
google/sentencepiece
tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py
decode
def decode(pieces, sequence_length, model_file=None, model_proto=None, reverse=False, name=None): """Decode pieces into postprocessed text. Args: pieces: A 2D int32 or string tensor [batch_size x max_length] of encoded sequences. sequence_length: A 1D int32 tensor [batch_size] repres...
python
def decode(pieces, sequence_length, model_file=None, model_proto=None, reverse=False, name=None): """Decode pieces into postprocessed text. Args: pieces: A 2D int32 or string tensor [batch_size x max_length] of encoded sequences. sequence_length: A 1D int32 tensor [batch_size] repres...
[ "def", "decode", "(", "pieces", ",", "sequence_length", ",", "model_file", "=", "None", ",", "model_proto", "=", "None", ",", "reverse", "=", "False", ",", "name", "=", "None", ")", ":", "return", "_gen_sentencepiece_processor_op", ".", "sentencepiece_decode", ...
Decode pieces into postprocessed text. Args: pieces: A 2D int32 or string tensor [batch_size x max_length] of encoded sequences. sequence_length: A 1D int32 tensor [batch_size] representing the length of pieces. model_file: The sentencepiece model file path. model_proto...
[ "Decode", "pieces", "into", "postprocessed", "text", "." ]
ffa2c8218f7afbb06d0c1bb87c82efb6867db41a
https://github.com/google/sentencepiece/blob/ffa2c8218f7afbb06d0c1bb87c82efb6867db41a/tensorflow/tf_sentencepiece/sentencepiece_processor_ops.py#L230-L251
train
Decode pieces into postprocessed text.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
eternnoir/pyTelegramBotAPI
telebot/util.py
split_string
def split_string(text, chars_per_string): """ Splits one string into multiple strings, with a maximum amount of `chars_per_string` characters per string. This is very useful for splitting one giant message into multiples. :param text: The text to split :param chars_per_string: The number of charact...
python
def split_string(text, chars_per_string): """ Splits one string into multiple strings, with a maximum amount of `chars_per_string` characters per string. This is very useful for splitting one giant message into multiples. :param text: The text to split :param chars_per_string: The number of charact...
[ "def", "split_string", "(", "text", ",", "chars_per_string", ")", ":", "return", "[", "text", "[", "i", ":", "i", "+", "chars_per_string", "]", "for", "i", "in", "range", "(", "0", ",", "len", "(", "text", ")", ",", "chars_per_string", ")", "]" ]
Splits one string into multiple strings, with a maximum amount of `chars_per_string` characters per string. This is very useful for splitting one giant message into multiples. :param text: The text to split :param chars_per_string: The number of characters per line the text is split into. :return: The ...
[ "Splits", "one", "string", "into", "multiple", "strings", "with", "a", "maximum", "amount", "of", "chars_per_string", "characters", "per", "string", ".", "This", "is", "very", "useful", "for", "splitting", "one", "giant", "message", "into", "multiples", "." ]
47b53b88123097f1b9562a6cd5d4e080b86185d1
https://github.com/eternnoir/pyTelegramBotAPI/blob/47b53b88123097f1b9562a6cd5d4e080b86185d1/telebot/util.py#L186-L195
train
Splits one string into multiple strings with a maximum amount of chars_per_string characters per string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
eternnoir/pyTelegramBotAPI
telebot/util.py
extract_arguments
def extract_arguments(text): """ Returns the argument after the command. Examples: extract_arguments("/get name"): 'name' extract_arguments("/get"): '' extract_arguments("/get@botName name"): 'name' :param text: String to extract the arguments from a command :return: the argume...
python
def extract_arguments(text): """ Returns the argument after the command. Examples: extract_arguments("/get name"): 'name' extract_arguments("/get"): '' extract_arguments("/get@botName name"): 'name' :param text: String to extract the arguments from a command :return: the argume...
[ "def", "extract_arguments", "(", "text", ")", ":", "regexp", "=", "re", ".", "compile", "(", "\"/\\w*(@\\w*)*\\s*([\\s\\S]*)\"", ",", "re", ".", "IGNORECASE", ")", "result", "=", "regexp", ".", "match", "(", "text", ")", "return", "result", ".", "group", "...
Returns the argument after the command. Examples: extract_arguments("/get name"): 'name' extract_arguments("/get"): '' extract_arguments("/get@botName name"): 'name' :param text: String to extract the arguments from a command :return: the arguments if `text` is a command (according to ...
[ "Returns", "the", "argument", "after", "the", "command", ".", "Examples", ":", "extract_arguments", "(", "/", "get", "name", ")", ":", "name", "extract_arguments", "(", "/", "get", ")", ":", "extract_arguments", "(", "/", "get" ]
47b53b88123097f1b9562a6cd5d4e080b86185d1
https://github.com/eternnoir/pyTelegramBotAPI/blob/47b53b88123097f1b9562a6cd5d4e080b86185d1/telebot/util.py#L235-L249
train
Extracts the arguments after the command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...