Skip to content

Commit 9c68820

Browse files
committed
Fixes OPCTL unit tests.
1 parent 6e33aef commit 9c68820

15 files changed

+83
-145
lines changed

ads/jobs/builders/runtimes/container_runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ def init(self, **kwargs) -> "ContainerRuntime":
136136
return self.with_image(
137137
image=kwargs.get("image", "iad.ocir.io/namespace/image:tag"),
138138
entrypoint=["bash", "--login", "-c"],
139-
cmd="{Container CMD. For MLFlow and Operator will be auto generated}",
139+
cmd="{Container CMD. For MLflow and Operator will be auto generated}",
140140
)

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ spec:
2222
runtime:
2323
kind: runtime
2424
spec:
25-
cmd: '{Container CMD. For MLFlow, it will be replaced with the Project CMD}'
25+
args: []
26+
cmd: '{Container CMD. For MLflow and Operator will be auto generated}'
2627
entrypoint:
2728
- bash
2829
- --login
2930
- -c
30-
env:
31-
- name: env_name
32-
value: env_value
33-
freeformTags:
34-
tag_name: tag_value
35-
image: iad.ocir.io/namespace/image:tag
31+
freeformTags: {}
32+
image: /image:latest
3633
type: container

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,11 @@ spec:
2222
runtime:
2323
kind: runtime
2424
spec:
25+
args: []
2526
conda:
26-
type: published
27-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
27+
slug: ''
28+
type: service
2829
entrypoint: '{For MLflow and Operator will be auto generated}'
29-
env:
30-
- name: env_name
31-
value: env_value
32-
freeformTags:
33-
tag_name: tag_value
30+
freeformTags: {}
3431
url: '{Git URI. For MLflow and Operator will be auto generated}'
3532
type: gitPython

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,14 @@ spec:
2222
runtime:
2323
kind: runtime
2424
spec:
25+
args: []
2526
conda:
26-
type: published
27-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
28-
entrypoint: '{Entrypoint notebook. For MLflow, it will be replaced with the
29-
CMD}'
30-
env:
31-
- name: env_name
32-
value: env_value
27+
slug: ''
28+
type: service
29+
entrypoint: '{Entrypoint notebook. For MLflow, it will be replaced with the CMD}'
3330
excludeTags:
3431
- tag1
35-
freeformTags:
36-
tag_name: tag_value
32+
freeformTags: {}
3733
notebookEncoding: utf-8
38-
source: '{Path to the source code directory. For MLflow, it will be replaced
39-
with the path to the project}'
34+
source: '{Path to the source code directory. For MLflow, it will be replaced with the path to the project}'
4035
type: notebook

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ spec:
2222
runtime:
2323
kind: runtime
2424
spec:
25+
args: []
2526
conda:
26-
type: published
27-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
27+
slug: conda_slug
28+
type: service
2829
entrypoint: '{For MLflow and Operator will be auto generated}'
29-
env:
30-
- name: env_name
31-
value: env_value
32-
freeformTags:
33-
tag_name: tag_value
34-
scriptPathURI: '{Path to the script. For MLflow, it will be replaced with the
35-
path to the project}'
30+
freeformTags: {}
31+
scriptPathURI: '{Path to the script. For MLflow and Operator will be auto
32+
generated}'
3633
workingDir: '{For MLflow and Operator will be auto generated}'
3734
type: python

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@ spec:
2222
runtime:
2323
kind: runtime
2424
spec:
25+
args: []
2526
conda:
26-
type: published
27-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
27+
slug: conda_slug
28+
type: service
2829
entrypoint: '{For MLflow and Operator will be auto generated}'
29-
env:
30-
- name: env_name
31-
value: env_value
32-
freeformTags:
33-
tag_name: tag_value
34-
scriptPathURI: '{Path to the script. For MLflow, it will be replaced with the
35-
path to the project}'
30+
freeformTags: {}
31+
scriptPathURI: '{Path to the script. For MLflow and Operator will be auto generated}'
3632
type: script

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,13 @@ spec:
2727
runtime:
2828
kind: runtime
2929
spec:
30-
args:
31-
- --key1
32-
- val1
33-
cmd: '{Container CMD. For MLFlow, it will be replaced with the Project CMD}'
30+
args: []
31+
cmd: '{Container CMD. For MLflow and Operator will be auto generated}'
3432
entrypoint:
3533
- bash
3634
- --login
3735
- -c
38-
env:
39-
- name: env_name
40-
value: env_value
41-
freeformTags:
42-
tag_name: tag_value
36+
freeformTags: {}
4337
image: iad.ocir.io/namespace/image:tag
4438
type: container
4539
type: pipeline

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

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,12 @@ spec:
2727
runtime:
2828
kind: runtime
2929
spec:
30-
args:
31-
- --key1
32-
- val1
30+
args: []
3331
conda:
34-
type: published
35-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
36-
entrypoint: '{Entrypoint script. For MLflow, it will be replaced with the
37-
CMD}'
38-
env:
39-
- name: env_name
40-
value: env_value
41-
freeformTags:
42-
tag_name: tag_value
32+
slug: ''
33+
type: service
34+
entrypoint: '{For MLflow and Operator will be auto generated}'
35+
freeformTags: {}
4336
url: '{Git URI. For MLflow and Operator will be auto generated}'
4437
type: gitPython
4538
type: pipeline

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

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,15 @@ spec:
2727
runtime:
2828
kind: runtime
2929
spec:
30-
args:
31-
- --key1
32-
- val1
30+
args: []
3331
conda:
34-
type: published
35-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
36-
entrypoint: '{Entrypoint notebook. For MLflow, it will be replaced with
37-
the CMD}'
38-
env:
39-
- name: env_name
40-
value: env_value
32+
slug: ''
33+
type: service
34+
entrypoint: '{Entrypoint notebook. For MLflow, it will be replaced with the CMD}'
4135
excludeTags:
4236
- tag1
43-
freeformTags:
44-
tag_name: tag_value
37+
freeformTags: {}
4538
notebookEncoding: utf-8
46-
source: '{Path to the source code directory. For MLflow, it will be replaced
47-
with the path to the project}'
39+
source: '{Path to the source code directory. For MLflow, it will be replaced with the path to the project}'
4840
type: notebook
4941
type: pipeline

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

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,14 @@ spec:
2727
runtime:
2828
kind: runtime
2929
spec:
30-
args:
31-
- --key1
32-
- val1
33-
- --key1
34-
- val1
30+
args: []
3531
conda:
36-
type: published
37-
uri: '{Path to the custom conda environment. Example: oci://your_bucket@namespace/object_name'
38-
entrypoint: '{Entrypoint script. For MLflow, it will be replaced with the
39-
CMD}'
40-
env:
41-
- name: env_name
42-
value: env_value
43-
freeformTags:
44-
tag_name: tag_value
45-
scriptPathURI: '{Path to the script. For MLflow, it will be replaced with
46-
the path to the project}'
32+
slug: ''
33+
type: service
34+
entrypoint: '{For MLflow and Operator will be auto generated}'
35+
freeformTags: {}
36+
scriptPathURI: '{Path to the script. For MLflow and Operator will be auto
37+
generated}'
4738
workingDir: '{For MLflow and Operator will be auto generated}'
4839
type: python
4940
type: pipeline

0 commit comments

Comments
 (0)