From 52a14e5adc53e7d30657982a85663736eb04963b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Jan 2023 16:19:31 -0800 Subject: [PATCH] [Automated]: Update Python API docs (#13927) --- docs/api/python/.buildinfo | 2 +- docs/api/python/api_summary.html | 99 +- docs/api/python/auto_examples/index.html | 9 +- .../python/auto_examples/plot_backend.html | 11 +- .../auto_examples/plot_common_errors.html | 11 +- .../plot_convert_pipeline_vectorizer.html | 23 +- .../auto_examples/plot_load_and_predict.html | 35 +- .../python/auto_examples/plot_metadata.html | 11 +- .../python/auto_examples/plot_pipeline.html | 21 +- .../python/auto_examples/plot_profiling.html | 27 +- .../plot_train_convert_predict.html | 123 +- .../auto_examples/sg_execution_times.html | 42 +- .../auto_examples_python.zip | Bin 23566 -> 23566 bytes .../auto_examples_jupyter.zip | Bin 40962 -> 40962 bytes docs/api/python/examples_md.html | 9 +- docs/api/python/genindex.html | 7 +- .../images/sphx_glr_plot_pipeline_001.png | Bin 33881 -> 33881 bytes ...phx_glr_plot_train_convert_predict_001.png | Bin 29777 -> 30089 bytes ...x_glr_plot_train_convert_predict_thumb.png | Bin 22991 -> 23217 bytes docs/api/python/index.html | 9 +- docs/api/python/modules/index.html | 10 +- .../onnxruntime_inference_collection.html | 113 +- docs/api/python/search.html | 7 +- docs/api/python/searchindex.js | 2 +- .../auto_examples/plot_backend.rst.txt | 2 +- .../auto_examples/plot_common_errors.rst.txt | 2 +- .../plot_convert_pipeline_vectorizer.rst.txt | 6 +- .../plot_load_and_predict.rst.txt | 26 +- .../auto_examples/plot_metadata.rst.txt | 2 +- .../auto_examples/plot_pipeline.rst.txt | 4 +- .../auto_examples/plot_profiling.rst.txt | 18 +- .../plot_train_convert_predict.rst.txt | 105 +- .../auto_examples/sg_execution_times.rst.txt | 18 +- .../_sphinx_javascript_frameworks_compat.js | 134 - docs/api/python/static/alabaster.css | 4 +- docs/api/python/static/basic.css | 54 +- docs/api/python/static/doctools.js | 2 +- docs/api/python/static/graphviz.css | 2 +- docs/api/python/static/jquery-3.6.0.js | 10881 ---------------- docs/api/python/static/jquery.js | 2 - docs/api/python/static/language_data.js | 2 +- docs/api/python/static/searchtools.js | 2 +- docs/api/python/static/underscore-1.13.1.js | 2042 --- docs/api/python/static/underscore.js | 6 - docs/api/python/tutorial.html | 23 +- 45 files changed, 403 insertions(+), 13505 deletions(-) delete mode 100644 docs/api/python/static/_sphinx_javascript_frameworks_compat.js delete mode 100644 docs/api/python/static/jquery-3.6.0.js delete mode 100644 docs/api/python/static/jquery.js delete mode 100644 docs/api/python/static/underscore-1.13.1.js delete mode 100644 docs/api/python/static/underscore.js diff --git a/docs/api/python/.buildinfo b/docs/api/python/.buildinfo index 0758e79596..e817dec9a8 100644 --- a/docs/api/python/.buildinfo +++ b/docs/api/python/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 978b25a22c73c6c97974b1c827a546bd +config: fa4364778ec99187343222d4f759e041 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/api/python/api_summary.html b/docs/api/python/api_summary.html index 02e0de0b1b..565c256578 100644 --- a/docs/api/python/api_summary.html +++ b/docs/api/python/api_summary.html @@ -4,7 +4,7 @@
- + @@ -24,9 +24,6 @@ - - - @@ -51,7 +48,7 @@ONNX Runtime loads and runs inference on a model in ONNX graph format, or ORT format (for memory and disk constrained environments).
The data consumed and produced by the model can be specified and accessed in the way that best matches your scenario.
InferenceSession is the main class of ONNX Runtime. It is used to load and run an ONNX model, as well as specify environment and application configuration options.
session = onnxruntime.InferenceSession('model.onnx')
@@ -135,10 +132,10 @@ profiling on the session:
The ONNX Runtime Inference Session consumes and produces data using its OrtValue class.
On CPU (the default), OrtValues can be mapped to and from native Python data structures: numpy arrays, dictionaries and lists of numpy arrays.
# X is numpy array on cpu
@@ -159,7 +156,7 @@ may not optimal if the input or output is consumed and produced on a device
other than CPU because it introduces data copy between CPU and the device.
-Data on device¶
+Data on device¶
ONNX Runtime supports a custom data structure that supports all ONNX data formats that allows users
to place the data backing these on a device, for example, on a CUDA supported device. In ONNX Runtime,
this called IOBinding.
@@ -261,15 +258,15 @@ Users can thus consume the ONNX Runtime allocated memory for the output
-API Details¶
+API Details¶
-InferenceSession¶
+InferenceSession¶
-
class onnxruntime.InferenceSession(path_or_bytes, sess_options=None, providers=None, provider_options=None, **kwargs)[source]¶
This is the main class used to run a model.
-- Parameters
+- Parameters:
path_or_bytes – filename or serialized ONNX or ORT format model in a byte string
sess_options – session options
@@ -382,14 +379,14 @@ For instance, on Windows and MacOS, the precision will be ~100ns
run(output_names, input_feed, run_options=None)¶
Compute the predictions.
-- Parameters
+- Parameters:
output_names – name of the outputs
input_feed – dictionary { input_name: input_value }
run_options – See onnxruntime.RunOptions.
-- Returns
+- Returns:
list of results, every result is either a numpy array,
a sparse tensor, a list or a dictionary.
@@ -404,7 +401,7 @@ a sparse tensor, a list or a dictionary.
run_with_iobinding(iobinding, run_options=None)¶
Compute the predictions.
-- Parameters
+- Parameters:
iobinding – the iobinding object that has graph inputs/outputs bind.
run_options – See onnxruntime.RunOptions.
@@ -418,7 +415,7 @@ a sparse tensor, a list or a dictionary.
run_with_ort_values(output_names, input_dict_ort_values, run_options=None)¶
Compute the predictions.
-- Parameters
+- Parameters:
output_names – name of the outputs
input_dict_ort_values – dictionary { input_name: input_ort_value }
@@ -427,7 +424,7 @@ from numpy array or SparseTensor
run_options – See onnxruntime.RunOptions.
-- Returns
+- Returns:
an array of OrtValue
@@ -441,7 +438,7 @@ from numpy array or SparseTensor
run_with_ortvaluevector(run_options, feed_names, feeds, fetch_names, fetches, fetch_devices)¶
Compute the predictions similar to other run_*() methods but with minimal C++/Python conversion overhead.
-- Parameters
+- Parameters:
run_options – See onnxruntime.RunOptions.
feed_names – list of input names.
@@ -459,7 +456,7 @@ from numpy array or SparseTensor
set_providers(providers=None, provider_options=None)¶
Register the input list of execution providers. The underlying session is re-created.
-- Parameters
+- Parameters:
providers – Optional sequence of providers in order of decreasing
precedence. Values can either be provider names or tuples of
@@ -482,9 +479,9 @@ otherwise execute using CPUExecutionProvider.
-Options¶
+Options¶
-RunOptions¶
+RunOptions¶
-
class onnxruntime.RunOptions(self: onnxruntime.capi.onnxruntime_pybind11_state.RunOptions)¶
@@ -543,7 +540,7 @@ RunOptions instance. The individual calls will exit gracefully and return an err
-SessionOptions¶
+SessionOptions¶
-
class onnxruntime.SessionOptions(self: onnxruntime.capi.onnxruntime_pybind11_state.SessionOptions)¶
@@ -690,9 +687,9 @@ Serialized model format will default to ONNX unless:
-Data¶
+Data¶
-OrtValue¶
+OrtValue¶
-
class onnxruntime.OrtValue(ortvalue, numpy_obj=None)[source]¶
@@ -776,7 +773,7 @@ The new instance of OrtValue will assume the ownership of sparse_tensor
Factory method to construct an OrtValue (which holds a Tensor) from a given Numpy object
A copy of the data in the Numpy object is held by the OrtValue only if the device is NOT cpu
-- Parameters
+- Parameters:
numpy_obj – The Numpy object to construct the OrtValue from
device_type – e.g. cpu, cuda, cpu by default
@@ -791,7 +788,7 @@ A copy of the data in the Numpy object is held by the OrtValue only if the devic
static ortvalue_from_shape_and_type(shape=None, element_type=None, device_type='cpu', device_id=0)[source]¶
Factory method to construct an OrtValue (which holds a Tensor) from given shape and element_type
-- Parameters
+- Parameters:
shape – List of integers indicating the shape of the OrtValue
element_type – The data type of the elements in the OrtValue (numpy type)
@@ -822,7 +819,7 @@ the memory address can not be changed.
-SparseTensor¶
+SparseTensor¶
-
class onnxruntime.SparseTensor(sparse_tensor)[source]¶
@@ -897,7 +894,7 @@ You can query indices as:
static sparse_coo_from_numpy(dense_shape, values, coo_indices, ort_device)[source]¶
Factory method to construct a SparseTensor in COO format from given arguments
-- Parameters
+- Parameters:
dense_shape – 1-D numpy array(int64) or a python list that contains a dense_shape of the sparse tensor
must be on cpu memory
@@ -927,7 +924,7 @@ on other devices and their memory can not be mapped.
static sparse_csr_from_numpy(dense_shape, values, inner_indices, outer_indices, ort_device)[source]¶
Factory method to construct a SparseTensor in CSR format from given arguments
-- Parameters
+- Parameters:
dense_shape – 1-D numpy array(int64) or a python list that contains a dense_shape of the
sparse tensor (rows, cols) must be on cpu memory
@@ -957,7 +954,7 @@ on other devices and their memory can not be mapped.
to_cuda(ort_device)[source]¶
Returns a copy of this instance on the specified cuda device
-- Parameters
+- Parameters:
ort_device – with name ‘cuda’ and valid gpu device id
@@ -983,9 +980,9 @@ copies of the strings.
-Devices¶
+Devices¶
-IOBinding¶
+IOBinding¶
-
class onnxruntime.IOBinding(session)[source]¶
@@ -1002,7 +999,7 @@ copies of the strings.
-
bind_input(name, device_type, device_id, element_type, shape, buffer_ptr)[source]¶
-- Parameters
+- Parameters:
name – input name
device_type – e.g. cpu, cuda
@@ -1019,7 +1016,7 @@ copies of the strings.
-
bind_ortvalue_input(name, ortvalue)[source]¶
-- Parameters
+- Parameters:
name – input name
ortvalue – OrtValue instance to bind
@@ -1032,7 +1029,7 @@ copies of the strings.
-
bind_ortvalue_output(name, ortvalue)[source]¶
-- Parameters
+- Parameters:
name – output name
ortvalue – OrtValue instance to bind
@@ -1045,7 +1042,7 @@ copies of the strings.
-
bind_output(name, device_type='cpu', device_id=0, element_type=None, shape=None, buffer_ptr=None)[source]¶
-- Parameters
+- Parameters:
name – output name
device_type – e.g. cpu, cuda, cpu by default
@@ -1075,7 +1072,7 @@ The data buffer of the obtained OrtValues may not reside on CPU memory
-OrtDevice¶
+OrtDevice¶
-Internal classes¶
+Internal classes¶
These classes cannot be instantiated by users but they are returned
by methods or functions of this library.
-ModelMetadata¶
+ModelMetadata¶
-
class onnxruntime.ModelMetadata¶
@@ -1143,7 +1140,7 @@ facilitate the comparison.
-NodeArg¶
+NodeArg¶
-
class onnxruntime.NodeArg¶
@@ -1173,7 +1170,7 @@ including arg name, arg type (contains both type and shape).
-Backend¶
+Backend¶
In addition to the regular API which is optimized for performance and usability,
ONNX Runtime also implements the
ONNX backend API
@@ -1184,13 +1181,13 @@ The following functions are supported:
onnxruntime.backend.is_compatible(model, device=None, **kwargs)¶
Return whether the model is compatible with the backend.
-- Parameters
+- Parameters:
model – unused
device – None to use the default device or a string (ex: ‘CPU’)
-- Returns
+- Returns:
boolean
@@ -1202,7 +1199,7 @@ The following functions are supported:
Load the model and creates a onnxruntime.InferenceSession
ready to be used as a backend.
-- Parameters
+- Parameters:
model – ModelProto (returned by onnx.load),
string for a filename or bytes for a serialized model
@@ -1212,7 +1209,7 @@ the compilation settings
kwargs – see onnxruntime.SessionOptions
-- Returns
+- Returns:
-
@@ -1223,7 +1220,7 @@ the compilation settings
onnxruntime.backend.run(model, inputs, device=None, **kwargs)¶
Compute the prediction.
-- Parameters
+- Parameters:
model – onnxruntime.InferenceSession returned
by function prepare
@@ -1234,7 +1231,7 @@ the compilation settings
kwargs – see onnxruntime.RunOptions
-- Returns
+- Returns:
predictions
@@ -1311,8 +1308,8 @@ In particular it’s used in the testing suite.
©2018-2021, Microsoft.
|
- Powered by Sphinx 5.3.0
- & Alabaster 0.7.12
+ Powered by Sphinx 6.1.3
+ & Alabaster 0.7.13
|
-
+
@@ -24,9 +24,6 @@
-
-
-
@@ -151,8 +148,8 @@
©2018-2021, Microsoft.
|
- Powered by Sphinx 5.3.0
- & Alabaster 0.7.12
+ Powered by Sphinx 6.1.3
+ & Alabaster 0.7.13
|
-
+
@@ -24,9 +24,6 @@
-
-
-
@@ -112,7 +109,7 @@ without using onnx.
The backend API is implemented by other frameworks
and makes it easier to switch between multiple runtimes
with the same API.
-Total running time of the script: ( 0 minutes 0.021 seconds)
+Total running time of the script: ( 0 minutes 0.019 seconds)
-Total running time of the script: ( 0 minutes 0.014 seconds)
+Total running time of the script: ( 0 minutes 0.011 seconds)