Skip to content

Commit 8dad93d

Browse files
committed
Fix unit tests
1 parent 43f9ea3 commit 8dad93d

File tree

6 files changed

+11
-18
lines changed

6 files changed

+11
-18
lines changed

ads/jobs/builders/infrastructure/dsc_job.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,20 +1481,13 @@ def init(self) -> DataScienceJob:
14811481
DataScienceJob
14821482
The DataScienceJob instance (self)
14831483
"""
1484-
(
1484+
return (
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 or remove this field if you use a default networking}")
14881489
)
14891490

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-
14981491
def create(self, runtime, **kwargs) -> DataScienceJob:
14991492
"""Creates a job with runtime.
15001493

tests/unitary/with_extras/opctl/test_files/pipeline_container.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
blockStorageSize: 50
2323
compartmentId: ocid1.compartment.oc1..<unique_id>
2424
projectId: ocid1.datascienceproject.oc1.<unique_id>
25-
subnetId: '{Provide a subnet OCID}'
25+
subnetId: '{Provide a subnet OCID or remove this field if you use a default networking}'
2626
name: pipeline_step_name_1
2727
runtime:
2828
kind: runtime

tests/unitary/with_extras/opctl/test_files/pipeline_gitPython.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This YAML specification was auto generated by the `ads opctl init` command.
22
# The more details about the jobs YAML specification can be found in the ADS documentation:
3-
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
3+
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
44

55

66
kind: pipeline
@@ -22,7 +22,7 @@ spec:
2222
blockStorageSize: 50
2323
compartmentId: ocid1.compartment.oc1..<unique_id>
2424
projectId: ocid1.datascienceproject.oc1.<unique_id>
25-
subnetId: '{Provide a subnet OCID}'
25+
subnetId: '{Provide a subnet OCID or remove this field if you use a default networking}'
2626
name: pipeline_step_name_1
2727
runtime:
2828
kind: runtime

tests/unitary/with_extras/opctl/test_files/pipeline_notebook.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This YAML specification was auto generated by the `ads opctl init` command.
22
# The more details about the jobs YAML specification can be found in the ADS documentation:
3-
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
3+
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
44

55

66
kind: pipeline
@@ -22,7 +22,7 @@ spec:
2222
blockStorageSize: 50
2323
compartmentId: ocid1.compartment.oc1..<unique_id>
2424
projectId: ocid1.datascienceproject.oc1.<unique_id>
25-
subnetId: '{Provide a subnet OCID}'
25+
subnetId: '{Provide a subnet OCID or remove this field if you use a default networking}'
2626
name: pipeline_step_name_1
2727
runtime:
2828
kind: runtime

tests/unitary/with_extras/opctl/test_files/pipeline_python.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This YAML specification was auto generated by the `ads opctl init` command.
22
# The more details about the jobs YAML specification can be found in the ADS documentation:
3-
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
3+
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
44

55

66
kind: pipeline
@@ -22,7 +22,7 @@ spec:
2222
blockStorageSize: 50
2323
compartmentId: ocid1.compartment.oc1..<unique_id>
2424
projectId: ocid1.datascienceproject.oc1.<unique_id>
25-
subnetId: '{Provide a subnet OCID}'
25+
subnetId: '{Provide a subnet OCID or remove this field if you use a default networking}'
2626
name: pipeline_step_name_1
2727
runtime:
2828
kind: runtime

tests/unitary/with_extras/opctl/test_files/pipeline_script.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This YAML specification was auto generated by the `ads opctl init` command.
22
# The more details about the jobs YAML specification can be found in the ADS documentation:
3-
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
3+
# https://accelerated-data-science.readthedocs.io/en/latest/user_guide/pipeline/quick_start.html
44

55

66
kind: pipeline
@@ -22,7 +22,7 @@ spec:
2222
blockStorageSize: 50
2323
compartmentId: ocid1.compartment.oc1..<unique_id>
2424
projectId: ocid1.datascienceproject.oc1.<unique_id>
25-
subnetId: '{Provide a subnet OCID}'
25+
subnetId: '{Provide a subnet OCID or remove this field if you use a default networking}'
2626
name: pipeline_step_name_1
2727
runtime:
2828
kind: runtime

0 commit comments

Comments
 (0)