@@ -185,6 +185,7 @@ def remote(
185185 methods that are not available via PyPI or conda. Default value is ``False``.
186186
187187 instance_count (int): The number of instances to use. Defaults to 1.
188+ NOTE: Remote function does not support instance_count > 1
188189
189190 instance_type (str): The Amazon Elastic Compute Cloud (EC2) instance type to use to run
190191 the SageMaker job. e.g. ml.c4.xlarge. If not provided, a ValueError is thrown.
@@ -255,6 +256,12 @@ def _remote(func):
255256 @functools .wraps (func )
256257 def wrapper (* args , ** kwargs ):
257258
259+ if instance_count > 1 :
260+ raise ValueError (
261+ "Remote function do not support training on multi instances. "
262+ + "Please provide instance_count = 1"
263+ )
264+
258265 RemoteExecutor ._validate_submit_args (func , * args , ** kwargs )
259266
260267 job_settings = _JobSettings (
@@ -574,6 +581,7 @@ def __init__(
574581 and methods that are not available via PyPI or conda. Default value is ``False``.
575582
576583 instance_count (int): The number of instances to use. Defaults to 1.
584+ NOTE: Remote function does not support instance_count > 1
577585
578586 instance_type (str): The Amazon Elastic Compute Cloud (EC2) instance type to use to run
579587 the SageMaker job. e.g. ml.c4.xlarge. If not provided, a ValueError is thrown.
@@ -647,6 +655,12 @@ def __init__(
647655 if self .max_parallel_jobs <= 0 :
648656 raise ValueError ("max_parallel_jobs must be greater than 0." )
649657
658+ if instance_count > 1 :
659+ raise ValueError (
660+ "Remote function do not support training on multi instances. "
661+ + "Please provide instance_count = 1"
662+ )
663+
650664 self .job_settings = _JobSettings (
651665 dependencies = dependencies ,
652666 pre_execution_commands = pre_execution_commands ,
0 commit comments