Skip to content

Commit 2e73797

Browse files
authored
Minor update on Jobs API docs (#200)
2 parents 7a31602 + 0b04b0d commit 2e73797

File tree

8 files changed

+44
-19
lines changed

8 files changed

+44
-19
lines changed

docs/source/user_guide/jobs/data_science_job.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Quick Start
88

99
See :doc:`policies` and `About Data Science Policies <https://docs.oracle.com/en-us/iaas/data-science/using/policies.htm>`_.
1010

11+
1112
Define a Job
1213
============
1314

docs/source/user_guide/jobs/infra_and_runtime.rst

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Infrastructure and Runtime
33

44
This page describes the configurations of **Infrastructure** and **Runtime** defining a Data Science Job.
55

6-
.. include:: ../jobs/toc_local.rst
76

87
Example
98
=======
@@ -99,9 +98,42 @@ a service gateway, both are configured automatically. Custom networking requires
9998
You can control the network access through the subnet and security lists.
10099

101100
If you specified a subnet ID, your job will be configured to have custom networking.
102-
Otherwise, default networking will be used. Note that when you are in a Data Science Notebook Session,
101+
Otherwise, default networking will be used.
102+
103+
Note that when you are in a Data Science Notebook Session,
103104
the same networking configuration is be used by default.
104105
You can specify the networking manually by calling :py:meth:`~ads.jobs.DataScienceJob.with_job_infrastructure_type()`.
106+
For example, if you are using custom networking in the notebook session
107+
but you would like to use default networking for the job:
108+
109+
.. tabs::
110+
111+
.. code-tab:: python
112+
:caption: Python
113+
114+
from ads.jobs import DataScienceJob
115+
116+
infrastructure = (
117+
DataScienceJob()
118+
.with_log_group_id("<log_group_ocid>")
119+
.with_log_id("<log_ocid>")
120+
# Use default networking,
121+
# regardless of the networking used by the notebook session
122+
.with_job_infrastructure_type("ME_STANDALONE")
123+
# compartment ID, project ID, compute shape and block storage will be
124+
# the same as the ones set in the notebook session
125+
)
126+
127+
.. code-tab:: yaml
128+
:caption: YAML
129+
130+
kind: infrastructure
131+
type: dataScienceJob
132+
spec:
133+
jobInfrastructureType: ME_STANDALONE
134+
logGroupId: <log_group_ocid>
135+
logId: <log_ocid>
136+
105137

106138
Logging
107139
-------

docs/source/user_guide/jobs/policies.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This section describe the policies you might need for running Data Science Jobs.
1515

1616
In the following example, ``group <your_data_science_users>`` is the subject of the policy
1717
when using OCI API keys for authentication. For resource principal authentication,
18-
the subject should be a ``dynamic-group``, for example, ``dynamic-group <your_resources>``
18+
the subject should be a ``dynamic-group``, for example, ``dynamic-group <your_dynamic_group>``
1919

2020
Here is an example defining a dynamic group for all job runs in a compartment:
2121

@@ -38,19 +38,19 @@ The following policies are for job runs to access other OCI resources:
3838

3939
.. code-block::
4040
41-
Allow dynamic-group <your_resources> to read repos in compartment <your_compartment_name>
42-
Allow dynamic-group <your_resources> to use data-science-family in compartment <your_compartment_name>
43-
Allow dynamic-group <your_resources> to use virtual-network-family in compartment <your_compartment_name>
44-
Allow dynamic-group <your_resources> to use log-groups in compartment <your_compartment_name>
45-
Allow dynamic-group <your_resources> to use logging-family in compartment <your_compartment_name>
46-
Allow dynamic-group <your_resources> to manage objects in compartment <your_compartment_name> where all {target.bucket.name=<your_bucket_name>}
47-
Allow dynamic-group <your_resources> to use buckets in compartment <your_compartment_name> where all {target.bucket.name=<your_bucket_name>}
41+
Allow dynamic-group <your_dynamic_group> to read repos in compartment <your_compartment_name>
42+
Allow dynamic-group <your_dynamic_group> to use data-science-family in compartment <your_compartment_name>
43+
Allow dynamic-group <your_dynamic_group> to use virtual-network-family in compartment <your_compartment_name>
44+
Allow dynamic-group <your_dynamic_group> to use log-groups in compartment <your_compartment_name>
45+
Allow dynamic-group <your_dynamic_group> to use logging-family in compartment <your_compartment_name>
46+
Allow dynamic-group <your_dynamic_group> to manage objects in compartment <your_compartment_name> where all {target.bucket.name=<your_bucket_name>}
47+
Allow dynamic-group <your_dynamic_group> to use buckets in compartment <your_compartment_name> where all {target.bucket.name=<your_bucket_name>}
4848
4949
The following policy is needed for running a container job:
5050

5151
.. code-block::
5252
53-
Allow dynamic-group <your_resources> to read repos in compartment <your_compartment_name>
53+
Allow dynamic-group <your_dynamic_group> to read repos in compartment <your_compartment_name>
5454
5555
See also:
5656

docs/source/user_guide/jobs/run_git.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Run Code from Git Repo
33

44
The :py:class:`~ads.jobs.GitPythonRuntime` allows you to run source code from a Git repository as a job.
55

6-
.. include:: ../jobs/toc_local.rst
76

87
PyTorch Example
98
===============

docs/source/user_guide/jobs/run_notebook.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Run a Notebook
33

44
The :py:class:`~ads.jobs.NotebookRuntime` allows you to run a single Jupyter notebook as a job.
55

6-
.. include:: ../jobs/toc_local.rst
76

87
TensorFlow Example
98
==================

docs/source/user_guide/jobs/run_python.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ You can configure the environment variables, command line arguments, and conda e
66
as described in :doc:`infra_and_runtime`. This section shows the additional enhancements provided by
77
:py:class:`~ads.jobs.PythonRuntime`.
88

9-
.. include:: ../jobs/toc_local.rst
109

1110
Example
1211
=======

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
- other_packages
9393
scriptPathURI: local/path/to/code_dir
9494
workingDir: code_dir
95-
workingDir: code_dir
9695

9796

9897
.. code-block:: python

docs/source/user_guide/jobs/toc_local.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)