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:
128
128
129
129
.. code-block :: python3
130
130
131
+ from ads.jobs import Job
132
+ from ads.jobs import DataScienceJob
133
+ from ads.jobs import ScriptRuntime
134
+
131
135
job = Job()
132
136
job.with_infrastructure(
133
137
DataScienceJob()
@@ -161,9 +165,9 @@ You could create the preceding example job with the following YAML file:
161
165
162
166
.. code-block :: yaml
163
167
164
- kind: job
165
- spec:
166
- infrastructure:
168
+ kind : job
169
+ spec :
170
+ infrastructure :
167
171
kind : infrastructure
168
172
type : dataScienceJob
169
173
spec :
@@ -177,14 +181,14 @@ You could create the preceding example job with the following YAML file:
177
181
memoryInGBs : 16
178
182
ocpus : 1
179
183
blockStorageSize : 50
180
- runtime:
181
- kind: runtime
184
+ runtime :
185
+ kind : runtime
182
186
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
188
192
189
193
190
194
Environment Variables
@@ -206,6 +210,7 @@ Suppose you want to run the following python script named ``job_script_env.py``:
206
210
This example runs a job with environment variables:
207
211
208
212
.. code-block :: python3
213
+
209
214
from ads.jobs import Job
210
215
from ads.jobs import DataScienceJob
211
216
from ads.jobs import ScriptRuntime
@@ -251,7 +256,7 @@ You could create the preceding example job with the following YAML file:
251
256
252
257
kind : job
253
258
spec :
254
- infrastructure:
259
+ infrastructure :
255
260
kind : infrastructure
256
261
type : dataScienceJob
257
262
spec :
@@ -265,16 +270,16 @@ You could create the preceding example job with the following YAML file:
265
270
memoryInGBs : 16
266
271
ocpus : 1
267
272
blockStorageSize : 50
268
- runtime:
273
+ runtime :
269
274
kind : runtime
270
275
type : python
271
276
spec :
272
277
env :
273
278
- 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
278
283
279
284
280
285
You can’t perform that action at this time.
0 commit comments