File tree Expand file tree Collapse file tree 1 file changed +21
-16
lines changed
docs/source/user_guide/jobs Expand file tree Collapse file tree 1 file changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ This example runs a job with CLI arguments:
128128
129129.. code-block :: python3
130130
131+ from ads.jobs import Job
132+ from ads.jobs import DataScienceJob
133+ from ads.jobs import ScriptRuntime
134+
131135 job = Job()
132136 job.with_infrastructure(
133137 DataScienceJob()
@@ -161,9 +165,9 @@ You could create the preceding example job with the following YAML file:
161165
162166.. code-block :: yaml
163167
164- kind: job
165- spec:
166- infrastructure:
168+ kind : job
169+ spec :
170+ infrastructure :
167171 kind : infrastructure
168172 type : dataScienceJob
169173 spec :
@@ -177,14 +181,14 @@ You could create the preceding example job with the following YAML file:
177181 memoryInGBs : 16
178182 ocpus : 1
179183 blockStorageSize : 50
180- runtime:
181- kind: runtime
184+ runtime :
185+ kind : runtime
182186 type : python
183- spec:
184- args:
185- - <first_argument>
186- - <second_argument>
187- scriptPathURI: job_script_argument .py
187+ spec :
188+ args :
189+ - <first_argument>
190+ - <second_argument>
191+ scriptPathURI : job_script_env .py
188192
189193
190194 Environment Variables
@@ -206,6 +210,7 @@ Suppose you want to run the following python script named ``job_script_env.py``:
206210 This example runs a job with environment variables:
207211
208212.. code-block :: python3
213+
209214 from ads.jobs import Job
210215 from ads.jobs import DataScienceJob
211216 from ads.jobs import ScriptRuntime
@@ -251,7 +256,7 @@ You could create the preceding example job with the following YAML file:
251256
252257 kind : job
253258 spec :
254- infrastructure:
259+ infrastructure :
255260 kind : infrastructure
256261 type : dataScienceJob
257262 spec :
@@ -265,16 +270,16 @@ You could create the preceding example job with the following YAML file:
265270 memoryInGBs : 16
266271 ocpus : 1
267272 blockStorageSize : 50
268- runtime:
273+ runtime :
269274 kind : runtime
270275 type : python
271276 spec :
272277 env :
273278 - name : KEY1
274- value: <first_value>
275- - name: KEY2
276- value: <second_value>
277- scriptPathURI: job_script_env.py
279+ value : <first_value>
280+ - name : KEY2
281+ value : <second_value>
282+ scriptPathURI : job_script_env.py
278283
279284
280285
You can’t perform that action at this time.
0 commit comments