Skip to content

Commit ec9af19

Browse files
committed
Update example code.
1 parent b2de39f commit ec9af19

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

docs/source/user_guide/jobs/tabs/name_substitution.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
type: python
5050
spec:
5151
conda:
52-
slug: pytorch19_p37_cpu_v1
52+
slug: pytorch110_p38_cpu_v1
5353
type: service
5454
env:
5555
- name: DATASET_NAME

docs/source/user_guide/jobs/tabs/python_runtime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
.with_runtime(
2727
PythonRuntime()
2828
# Specify the service conda environment by slug name.
29-
.with_service_conda("pytorch19_p37_cpu_v1")
29+
.with_service_conda("pytorch110_p38_cpu_v1")
3030
# The job artifact can be a single Python script, a directory or a zip file.
3131
.with_source("local/path/to/code_dir")
3232
# Environment variable
@@ -79,7 +79,7 @@
7979
- --key
8080
- arg2
8181
conda:
82-
slug: pytorch19_p37_cpu_v1
82+
slug: pytorch110_p38_cpu_v1
8383
type: service
8484
entrypoint: my_package/my_script.py
8585
env:

docs/source/user_guide/jobs/tabs/quick_start_job.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Specify the service conda environment by slug name.
2929
.with_service_conda("pytorch110_p38_cpu_v1")
3030
# Source code of the job, can be local or remote.
31-
.with_source("https://raw.githubusercontent.com/oracle-samples/oci-data-science-ai-samples/432357b123b7401ef67b116fe19aec217ca920f0/jobs/python/job%2Bsamples/greeting-env-cmd.py")
31+
.with_source("path/to/script.py")
3232
# Environment variable
3333
.with_environment_variable(NAME="Welcome to OCI Data Science.")
3434
# Command line argument
@@ -71,4 +71,4 @@
7171
env:
7272
- name: NAME
7373
value: Welcome to OCI Data Science.
74-
scriptPathURI: https://raw.githubusercontent.com/oracle-samples/oci-data-science-ai-samples/432357b123b7401ef67b116fe19aec217ca920f0/jobs/python/job%2Bsamples/greeting-env-cmd.py
74+
scriptPathURI: path/to/script.py

docs/source/user_guide/jobs/tabs/script_runtime.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@
2626
.with_runtime(
2727
ScriptRuntime()
2828
# Specify the service conda environment by slug name.
29-
.with_service_conda("pytorch19_p37_cpu_v1")
29+
.with_service_conda("pytorch110_p38_cpu_v1")
3030
# The job artifact can be a single Python script, a directory or a zip file.
3131
.with_source("local/path/to/code_dir")
32+
# Environment variable
33+
.with_environment_variable(NAME="Welcome to OCI Data Science.")
34+
# Command line argument
35+
.with_argument("100 linux \"hi there\"")
3236
# The entrypoint is applicable only to directory or zip file as source
3337
# The entrypoint should be a path relative to the working dir.
3438
# Here my_script.sh is a file in the code_dir/my_package directory
@@ -62,10 +66,15 @@
6266
kind: runtime
6367
type: script
6468
spec:
69+
args:
70+
- 100 linux "hi there"
6571
conda:
66-
slug: pytorch19_p37_cpu_v1
72+
slug: pytorch110_p38_cpu_v1
6773
type: service
6874
entrypoint: my_package/my_script.sh
75+
env:
76+
- name: NAME
77+
value: Welcome to OCI Data Science.
6978
scriptPathURI: local/path/to/code_dir
7079

7180
.. code-block:: python

0 commit comments

Comments
 (0)