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``:
201201
202202 import os
203203 import sys
204- print("Hello " + os.environ["KEY1"] + " and " + os.environ["KEY2"])""")
204+ print("Hello " + os.environ["KEY1"] + " and " + os.environ["KEY2"])
205205
206206 This example runs a job with environment variables:
207207
208208.. code-block :: python3
209+ from ads.jobs import Job
210+ from ads.jobs import DataScienceJob
211+ from ads.jobs import ScriptRuntime
209212
210213 job = Job()
211214 job.with_infrastructure(
@@ -246,12 +249,12 @@ You could create the preceding example job with the following YAML file:
246249
247250.. code-block :: yaml
248251
249- kind: job
250- spec:
252+ kind : job
253+ spec :
251254 infrastructure:
252- kind: infrastructure
255+ kind : infrastructure
253256 type : dataScienceJob
254- spec:
257+ spec :
255258 logGroupId : <log_group_ocid>
256259 logId : <log_ocid>
257260 compartmentId : <compartment_ocid>
@@ -263,11 +266,11 @@ You could create the preceding example job with the following YAML file:
263266 ocpus : 1
264267 blockStorageSize : 50
265268 runtime:
266- kind: runtime
269+ kind : runtime
267270 type : python
268- spec:
269- env:
270- - name: KEY1
271+ spec :
272+ env :
273+ - name : KEY1
271274 value: <first_value>
272275 - name: KEY2
273276 value: <second_value>
You can’t perform that action at this time.
0 commit comments