We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c2012b commit d8fffe9Copy full SHA for d8fffe9
src/sagemaker/estimator.py
@@ -578,6 +578,15 @@ def __init__(
578
self.dependencies = dependencies or []
579
self.uploaded_code: Optional[UploadedCode] = None
580
581
+ # Check that the user properly sets both subnet and secutiry_groupe_ids
582
+ if (
583
+ subnets is not None
584
+ and security_group_ids is None
585
+ or security_group_ids is not None
586
+ and subnets is None
587
+ ):
588
+ raise RuntimeError("When setting up custom VPC, both subnets and security_group_ids must be set")
589
+
590
if self.instance_type in ("local", "local_gpu"):
591
if self.instance_type == "local_gpu" and self.instance_count > 1:
592
raise RuntimeError("Distributed Training in Local GPU is not supported")
0 commit comments