Skip to content

Commit 6d60992

Browse files
committed
Update jobs yaml schama.
1 parent ca631c2 commit 6d60992

25 files changed

+2532
-529
lines changed

docs/source/user_guide/jobs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Data Science Jobs
1818
../cli/opctl/_template/jobs
1919
../cli/opctl/_template/monitoring
2020
../cli/opctl/localdev/local_jobs
21+
yaml_schema
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
YAML Schema
2+
***********
3+
4+
ADS Job
5+
=======
6+
7+
.. raw:: html
8+
:file: ../../yaml_schema/jobs/job.html
9+
10+
|
11+
12+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
13+
14+
.. literalinclude:: ../../yaml_schema/jobs/job.yaml
15+
:language: yaml
16+
:linenos:
17+
18+
19+
Data Science Job
20+
================
21+
22+
.. raw:: html
23+
:file: ../../yaml_schema/jobs/dataScienceJob.html
24+
25+
|
26+
27+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
28+
29+
.. literalinclude:: ../../yaml_schema/jobs/dataScienceJob.yaml
30+
:language: yaml
31+
:linenos:
32+
33+
34+
DataFlow
35+
========
36+
37+
.. raw:: html
38+
:file: ../../yaml_schema/jobs/dataFlow.html
39+
40+
|
41+
42+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
43+
44+
.. literalinclude:: ../../yaml_schema/jobs/dataFlow.yaml
45+
:language: yaml
46+
:linenos:
47+
48+
49+
Job Runtime Schemas
50+
===================
51+
52+
The runtime of a job can be one of the following.
53+
54+
Python Runtime
55+
--------------
56+
57+
.. raw:: html
58+
:file: ../../yaml_schema/jobs/pythonRuntime.html
59+
60+
|
61+
62+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
63+
64+
.. literalinclude:: ../../yaml_schema/jobs/pythonRuntime.yaml
65+
:language: yaml
66+
:linenos:
67+
68+
69+
Notebook Runtime
70+
----------------
71+
72+
.. raw:: html
73+
:file: ../../yaml_schema/jobs/notebookRuntime.html
74+
75+
|
76+
77+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
78+
79+
.. literalinclude:: ../../yaml_schema/jobs/notebookRuntime.yaml
80+
:language: yaml
81+
:linenos:
82+
83+
84+
GitPython Runtime
85+
-----------------
86+
87+
.. raw:: html
88+
:file: ../../yaml_schema/jobs/gitPythonRuntime.html
89+
90+
|
91+
92+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
93+
94+
.. literalinclude:: ../../yaml_schema/jobs/gitPythonRuntime.yaml
95+
:language: yaml
96+
:linenos:
97+
98+
99+
Container Runtime
100+
-----------------
101+
102+
.. raw:: html
103+
:file: ../../yaml_schema/jobs/containerRuntime.html
104+
105+
|
106+
107+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
108+
109+
.. literalinclude:: ../../yaml_schema/jobs/containerRuntime.yaml
110+
:language: yaml
111+
:linenos:
112+
113+
114+
Script Runtime
115+
--------------
116+
117+
.. raw:: html
118+
:file: ../../yaml_schema/jobs/scriptRuntime.html
119+
120+
|
121+
122+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
123+
124+
.. literalinclude:: ../../yaml_schema/jobs/scriptRuntime.yaml
125+
:language: yaml
126+
:linenos:
127+
128+
129+
DataFlow Runtime
130+
--------------
131+
132+
.. raw:: html
133+
:file: ../../yaml_schema/jobs/dataFlowRuntime.html
134+
135+
|
136+
137+
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
138+
139+
.. literalinclude:: ../../yaml_schema/jobs/dataFlowRuntime.yaml
140+
:language: yaml
141+
:linenos:

docs/source/user_guide/model_training/distributed_training/yaml_schema.rst

Lines changed: 3 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -5,175 +5,12 @@ YAML Schema
55
The distributed training workload is defined in ``YAML`` and can be launched by invoking the ``ads opctl run -f path/to/yaml`` command.
66

77
.. raw:: html
8-
:file: schema.html
8+
:file: ../../../yaml_schema/jobs/distributed.html
99

1010
|
1111
1212
Following is the YAML schema for validating the YAML using `Cerberus <https://docs.python-cerberus.org/en/stable/>`_:
1313

14-
.. code-block:: yaml
14+
.. literalinclude:: ../../../yaml_schema/jobs/distributed.yaml
15+
:language: yaml
1516
:linenos:
16-
17-
kind:
18-
type: string
19-
allowed:
20-
- distributed
21-
apiVersion:
22-
type: string
23-
spec:
24-
type: dict
25-
schema:
26-
infrastructure:
27-
type: dict
28-
schema:
29-
kind:
30-
type: string
31-
allowed:
32-
- infrastructure
33-
type:
34-
type: string
35-
allowed:
36-
- dataScienceJob
37-
apiVersion:
38-
type: string
39-
spec:
40-
type: dict
41-
schema:
42-
displayName:
43-
type: string
44-
compartmentId:
45-
type: string
46-
projectId:
47-
type: string
48-
logGroupId:
49-
type: string
50-
logId:
51-
type: string
52-
subnetId:
53-
type: string
54-
shapeName:
55-
type: string
56-
blockStorageSize:
57-
type: integer
58-
min: 50
59-
cluster:
60-
type: dict
61-
schema:
62-
kind:
63-
type: string
64-
allowed:
65-
- PYTORCH
66-
- DASK
67-
- HOROVOD
68-
- dask
69-
- pytorch
70-
- horovod
71-
apiVersion:
72-
type: string
73-
spec:
74-
type: dict
75-
schema:
76-
image:
77-
type: string
78-
workDir:
79-
type: string
80-
name:
81-
type: string
82-
config:
83-
type: dict
84-
nullable: true
85-
schema:
86-
startOptions:
87-
type: list
88-
schema:
89-
type: string
90-
env:
91-
type: list
92-
nullable: true
93-
schema:
94-
type: dict
95-
schema:
96-
name:
97-
type: string
98-
value:
99-
type:
100-
- number
101-
- string
102-
main:
103-
type: dict
104-
schema:
105-
name:
106-
type: string
107-
replicas:
108-
type: integer
109-
config:
110-
type: dict
111-
nullable: true
112-
schema:
113-
env:
114-
type: list
115-
nullable: true
116-
schema:
117-
type: dict
118-
schema:
119-
name:
120-
type: string
121-
value:
122-
type:
123-
- number
124-
- string
125-
worker:
126-
type: dict
127-
schema:
128-
name:
129-
type: string
130-
replicas:
131-
type: integer
132-
config:
133-
type: dict
134-
nullable: true
135-
schema:
136-
env:
137-
type: list
138-
nullable: true
139-
schema:
140-
type: dict
141-
schema:
142-
name:
143-
type: string
144-
value:
145-
type:
146-
- number
147-
- string
148-
runtime:
149-
type: dict
150-
schema:
151-
kind:
152-
type: string
153-
apiVersion:
154-
type: string
155-
spec:
156-
type: dict
157-
schema:
158-
entryPoint:
159-
type: string
160-
kwargs:
161-
type: string
162-
args:
163-
type: list
164-
schema:
165-
type:
166-
- number
167-
- string
168-
env:
169-
type: list
170-
nullable: true
171-
schema:
172-
type: dict
173-
schema:
174-
name:
175-
type: string
176-
value:
177-
type:
178-
- number
179-
- string

0 commit comments

Comments
 (0)