Skip to content

Commit 054b7f2

Browse files
committed
Improves DataScienceJob.init method
1 parent ee7ae76 commit 054b7f2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ads/jobs/builders/infrastructure/dsc_job.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,13 +1481,20 @@ def init(self) -> DataScienceJob:
14811481
DataScienceJob
14821482
The DataScienceJob instance (self)
14831483
"""
1484-
return (
1484+
(
14851485
self.build()
14861486
.with_compartment_id(self.compartment_id or "{Provide a compartment OCID}")
14871487
.with_project_id(self.project_id or "{Provide a project OCID}")
1488-
.with_subnet_id(self.subnet_id or "{Provide a subnet OCID}")
14891488
)
14901489

1490+
if self.job_infrastructure_type != "ME_STANDALONE":
1491+
self.with_subnet_id(self.subnet_id or "{Provide a subnet OCID}")
1492+
self.with_job_infrastructure_type(
1493+
self.job_infrastructure_type or "STANDALONE"
1494+
)
1495+
1496+
return self
1497+
14911498
def create(self, runtime, **kwargs) -> DataScienceJob:
14921499
"""Creates a job with runtime.
14931500

0 commit comments

Comments
 (0)