@@ -87,7 +87,7 @@ def remote(
87
87
This decorator wraps the annotated code and runs it as a new SageMaker job synchronously
88
88
with the provided runtime settings.
89
89
90
- Unless mentioned otherwise , the decorator first looks up the value from the SageMaker
90
+ In case a parameter value is not set , the decorator first looks up the value from the SageMaker
91
91
configuration file. If no value is specified in the configuration file or no configuration file
92
92
is found, the decorator selects the default as specified below. For more information, see
93
93
`Configuring and using defaults with the SageMaker Python SDK <https://sagemaker.readthedocs.io/
@@ -131,7 +131,7 @@ def remote(
131
131
annotated with the remote decorator is invoked using the Python runtime available
132
132
in the system path.
133
133
134
- * The parameter dependencies is set to auto_capture. SageMaker will automatically
134
+ * The parameter dependencies is set to `` auto_capture`` . SageMaker will automatically
135
135
generate an env_snapshot.yml corresponding to the current active conda environment’s
136
136
snapshot. You do not need to provide a dependencies file. The following conditions
137
137
apply:
@@ -204,7 +204,7 @@ def remote(
204
204
downloaded in the previous runs.
205
205
206
206
max_retry_attempts (int): The max number of times the job is retried on
207
- ``` InternalServerFailure` `` Error from SageMaker service. Defaults to 1.
207
+ ``InternalServerFailure`` Error from SageMaker service. Defaults to 1.
208
208
209
209
max_runtime_in_seconds (int): The upper limit in seconds to be used for training. After
210
210
this specified amount of time, SageMaker terminates the job regardless of its current
@@ -475,10 +475,10 @@ def __init__(
475
475
):
476
476
"""Constructor for RemoteExecutor
477
477
478
- Unless mentioned otherwise , the constructor first looks up the value from the SageMaker
479
- configuration file. If no value is specified in the configuration file or no configuration
480
- file is found, the constructor selects the default as specified below. For more
481
- information, see `Configuring and using defaults with the SageMaker Python SDK
478
+ In case a parameter value is not set , the constructor first looks up the value from the
479
+ SageMaker configuration file. If no value is specified in the configuration file or
480
+ no configuration file is found, the constructor selects the default as specified below.
481
+ For more information, see `Configuring and using defaults with the SageMaker Python SDK
482
482
<https://sagemaker.readthedocs.io/en/stable/overview.html
483
483
#configuring-and-using-defaults-with-the-sagemaker-python-sdk>`_.
484
484
@@ -520,7 +520,7 @@ def __init__(
520
520
annotated with the remote decorator is invoked using the Python runtime available
521
521
in the system path.
522
522
523
- * The parameter dependencies is set to auto_capture. SageMaker will automatically
523
+ * The parameter dependencies is set to `` auto_capture`` . SageMaker will automatically
524
524
generate an env_snapshot.yml corresponding to the current active conda environment’s
525
525
snapshot. You do not need to provide a dependencies file. The following conditions
526
526
apply:
@@ -595,7 +595,7 @@ def __init__(
595
595
max_parallel_jobs (int): Maximum number of jobs that run in parallel. Defaults to 1.
596
596
597
597
max_retry_attempts (int): The max number of times the job is retried on
598
- ``` InternalServerFailure` `` Error from SageMaker service. Defaults to 1.
598
+ ``InternalServerFailure`` Error from SageMaker service. Defaults to 1.
599
599
600
600
max_runtime_in_seconds (int): The upper limit in seconds to be used for training. After
601
601
this specified amount of time, SageMaker terminates the job regardless of its current
@@ -1012,7 +1012,8 @@ def wait(
1012
1012
timeout (int): Timeout in seconds to wait until the job is completed before it is
1013
1013
stopped. Defaults to ``None``.
1014
1014
1015
- Returns: None
1015
+ Returns:
1016
+ None
1016
1017
"""
1017
1018
1018
1019
with self ._condition :
@@ -1022,14 +1023,15 @@ def wait(
1022
1023
if self ._state == _RUNNING :
1023
1024
self ._job .wait (timeout = timeout )
1024
1025
1025
- def cancel (self ):
1026
+ def cancel (self ) -> bool :
1026
1027
"""Cancel the function execution.
1027
1028
1028
1029
This method prevents the SageMaker job being created or stops the underlying SageMaker job
1029
1030
early if it is already in progress.
1030
1031
1031
- Returns: ``True`` if the underlying SageMaker job created as a result of the remote function
1032
- run is cancelled.
1032
+ Returns:
1033
+ ``True`` if the underlying SageMaker job created as a result of the remote function
1034
+ run is cancelled.
1033
1035
"""
1034
1036
with self ._condition :
1035
1037
if self ._state == _FINISHED :
@@ -1042,18 +1044,27 @@ def cancel(self):
1042
1044
self ._state = _CANCELLED
1043
1045
return True
1044
1046
1045
- def running (self ):
1046
- """Returns ``True`` if the underlying sagemaker job is still running."""
1047
+ def running (self ) -> bool :
1048
+ """
1049
+ Returns:
1050
+ ``True`` if the underlying sagemaker job is still running.
1051
+ """
1047
1052
with self ._condition :
1048
1053
return self ._state == _RUNNING
1049
1054
1050
1055
def cancelled (self ):
1051
- """Returns ``True`` if the underlying sagemaker job was cancelled. ``False``, otherwise."""
1056
+ """
1057
+ Returns:
1058
+ ``True`` if the underlying sagemaker job was cancelled. ``False``, otherwise.
1059
+ """
1052
1060
with self ._condition :
1053
1061
return self ._state == _CANCELLED
1054
1062
1055
1063
def done (self ):
1056
- """Returns ``True`` if the underlying sagemaker job finished running."""
1064
+ """
1065
+ Returns:
1066
+ ``True`` if the underlying sagemaker job finished running.
1067
+ """
1057
1068
with self ._condition :
1058
1069
if self ._state == _RUNNING and self ._job .describe ()["TrainingJobStatus" ] in [
1059
1070
"Completed" ,
0 commit comments