Skip to content

Commit

Permalink
Use intersphinx_mapping instead of URLS in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
audeerington committed Dec 18, 2023
1 parent ff7bee9 commit 3c96ffa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
9 changes: 4 additions & 5 deletions audonnx/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,19 @@ def load(
onnxruntime inference on cpu.
If ``None`` and ``session_options`` is ``None``,
onnxruntime chooses the number of threads
session_options: onnxruntime.SessionOptions_ to use for inference.
session_options: :class:`onnxruntime.SessionOptions`
to use for inference.
If ``None`` the default options are used and the number of
threads for running inference on cpu is determined
by ``num_workers``. Otherwise, the provided options are used
and the ``session_options`` properties
inter_op_num_threads_ and intra_op_num_threads_
:attr:`~onnxruntime.SessionOptions.inter_op_num_threads`
and :attr:`~onnxruntime.SessionOptions.intra_op_num_threads`
determine the number of threads
for inference on cpu and ``num_workers`` is ignored
auto_install: install missing packages needed to create the object
.. _`provider(s)`: https://onnxruntime.ai/docs/execution-providers/
.. _onnxruntime.SessionOptions: https://onnxruntime.ai/docs/api/python/api_summary.html#sessionoptions
.. _inter_op_num_threads: https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.SessionOptions.inter_op_num_threads
.. _intra_op_num_threads: https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.SessionOptions.intra_op_num_threads
Returns:
model
Expand Down
9 changes: 4 additions & 5 deletions audonnx/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ class Model(audobject.Object):
onnxruntime inference on cpu.
If ``None`` and ``session_options`` is ``None``,
onnxruntime chooses the number of threads
session_options: onnxruntime.SessionOptions_ to use for inference.
session_options: :class:`onnxruntime.SessionOptions`
to use for inference.
If ``None`` the default options are used and the number of
threads for running inference on cpu is determined
by ``num_workers``. Otherwise, the provided options are used
and the ``session_options`` properties
inter_op_num_threads_ and intra_op_num_threads_
:attr:`~onnxruntime.SessionOptions.inter_op_num_threads`
and :attr:`~onnxruntime.SessionOptions.intra_op_num_threads`
determine the number of threads
for inference on cpu and ``num_workers`` is ignored
Expand Down Expand Up @@ -97,9 +99,6 @@ class Model(audobject.Object):
array([-195.1, 73.3], dtype=float32)
.. _`provider(s)`: https://onnxruntime.ai/docs/execution-providers/
.. _onnxruntime.SessionOptions: https://onnxruntime.ai/docs/api/python/api_summary.html#sessionoptions
.. _inter_op_num_threads: https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.SessionOptions.inter_op_num_threads
.. _intra_op_num_threads: https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.SessionOptions.intra_op_num_threads
"""
@audobject.init_decorator(
Expand Down
11 changes: 5 additions & 6 deletions audonnx/core/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ def create_model(
onnxruntime inference on cpu.
If ``None`` and ``session_options`` is ``None``,
onnxruntime chooses the number of threads
session_options: onnxruntime.SessionOptions_ to use for inference.
session_options: :class:`onnxruntime.SessionOptions`
to use for inference.
If ``None`` the default options are used and the number of
threads for running inference on cpu is determined
by ``num_workers``. Otherwise, the provided options are used
and the ``session_options`` properties
inter_op_num_threads_ and intra_op_num_threads_
:attr:`~onnxruntime.SessionOptions.inter_op_num_threads`
and :attr:`~onnxruntime.SessionOptions.intra_op_num_threads`
determine the number of threads
for inference on cpu and ``num_workers`` is ignored.
for inference on cpu and ``num_workers`` is ignored
Returns:
model object
Expand Down Expand Up @@ -87,9 +89,6 @@ def create_model(
.. _`supported data types`: https://onnxruntime.ai/docs/reference/operators/custom-python-operator.html#supported-data-types
.. _`provider(s)`: https://onnxruntime.ai/docs/execution-providers/
.. _onnxruntime.SessionOptions: https://onnxruntime.ai/docs/api/python/api_summary.html#sessionoptions
.. _inter_op_num_threads: https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.SessionOptions.inter_op_num_threads
.. _intra_op_num_threads: https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.SessionOptions.intra_op_num_threads
""" # noqa: E501
# create graph
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
intersphinx_mapping = {
'audobject': ('https://audeering.github.io/audobject/', None),
'python': ('https://docs.python.org/3/', None),
'onnxruntime': ('https://onnxruntime.ai/docs/api/python/', None),
'opensmile': ('https://audeering.github.io/opensmile-python/', None),
'torch': ('https://pytorch.org/docs/stable/', None),
}
Expand Down

0 comments on commit 3c96ffa

Please sign in to comment.