File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
docs/source/user_guide/jobs Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,14 @@ Suppose you want to run the following python script named ``job_script_env.py``:
201
201
202
202
import os
203
203
import sys
204
- print("Hello " + os.environ["KEY1"] + " and " + os.environ["KEY2"])""")
204
+ print("Hello " + os.environ["KEY1"] + " and " + os.environ["KEY2"])
205
205
206
206
This example runs a job with environment variables:
207
207
208
208
.. code-block :: python3
209
+ from ads.jobs import Job
210
+ from ads.jobs import DataScienceJob
211
+ from ads.jobs import ScriptRuntime
209
212
210
213
job = Job()
211
214
job.with_infrastructure(
@@ -246,12 +249,12 @@ You could create the preceding example job with the following YAML file:
246
249
247
250
.. code-block :: yaml
248
251
249
- kind: job
250
- spec:
252
+ kind : job
253
+ spec :
251
254
infrastructure:
252
- kind: infrastructure
255
+ kind : infrastructure
253
256
type : dataScienceJob
254
- spec:
257
+ spec :
255
258
logGroupId : <log_group_ocid>
256
259
logId : <log_ocid>
257
260
compartmentId : <compartment_ocid>
@@ -263,11 +266,11 @@ You could create the preceding example job with the following YAML file:
263
266
ocpus : 1
264
267
blockStorageSize : 50
265
268
runtime:
266
- kind: runtime
269
+ kind : runtime
267
270
type : python
268
- spec:
269
- env:
270
- - name: KEY1
271
+ spec :
272
+ env :
273
+ - name : KEY1
271
274
value: <first_value>
272
275
- name: KEY2
273
276
value: <second_value>
You can’t perform that action at this time.
0 commit comments