sdkagent

onnxruntime API reference

66 public APIs from onnxruntime (microsoft/onnxruntime) — 36 classes, 10 functions, 20 methods. Signatures extracted by static analysis of the actual source.

Repository: microsoft/onnxruntime

KindCount
Classes36
Functions10
Methods20

API list

funconnxruntime.print_debug_info()
Print information to help debugging.
classonnxruntime.python.onnxruntime_inference_collection.InferenceSession
This is the main class used to run a model.
classonnxruntime.python.onnxruntime_inference_collection.ModelCompiler
This class is used to compile an ONNX model.
methodonnxruntime.python.onnxruntime_inference_collection.ModelCompiler.compile_to_file(output_model_path:str | None=None)
Compiles to an output file.
classonnxruntime.python.onnxruntime_inference_collection.Session
This is the main class used to run a model.
methodonnxruntime.python.onnxruntime_inference_collection.Session.disable_fallback() -> None
Disable session.run() fallback mechanism.
methodonnxruntime.python.onnxruntime_inference_collection.Session.enable_fallback() -> None
Enable session.Run() fallback mechanism.
methodonnxruntime.python.onnxruntime_inference_collection.Session.get_modelmeta() -> C.ModelMetadata
Return the metadata.
methodonnxruntime.python.onnxruntime_inference_collection.Session.get_session_options() -> C.SessionOptions
Return the session options.
methodonnxruntime.python.onnxruntime_inference_collection.Session.io_binding() -> IOBinding
Return an onnxruntime.IOBinding object`.
methodonnxruntime.python.onnxruntime_inference_collection.Session.run(output_names, input_feed, run_options=None) -> Sequence[np.ndarray | SparseTensor | list | dict]
Compute the predictions.
methodonnxruntime.python.onnxruntime_inference_collection.Session.run_with_ort_values(output_names, input_dict_ort_values, run_options=None) -> Sequence[OrtValue]
Compute the predictions.
methodorttraining.orttraining.python.training.api.checkpoint_state.Parameter.data() -> np.ndarray
The data of the parameter
methodorttraining.orttraining.python.training.api.checkpoint_state.Parameter.grad() -> np.ndarray
The gradient of the parameter
methodorttraining.orttraining.python.training.api.checkpoint_state.Parameter.name() -> str
The name of the parameter
methodorttraining.orttraining.python.training.api.module.Module.eval() -> Module
Sets the Module in evaluation mode.
methodorttraining.orttraining.python.training.api.module.Module.export_model_for_inferencing(inference_model_uri:str | os.PathLike, graph_output_names:list[str]) -> None
Exports the model for inferencing.
methodorttraining.orttraining.python.training.api.module.Module.get_parameters_size(trainable_only:bool=True) -> int
Returns the size of the parameters.
methodorttraining.orttraining.python.training.api.module.Module.train(mode:bool=True) -> Module
Sets the Module in training mode.
methodorttraining.orttraining.python.training.api.optimizer.Optimizer.set_learning_rate(learning_rate:float) -> None
Sets the learning rate for the optimizer.
classorttraining.orttraining.python.training.artifacts.LossType
Loss type to be added to the training model.
classorttraining.orttraining.python.training.onnxblock.blocks.Abs
Adds Abs node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Add
Adds Add node to an onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Clip
Adds Clip node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Div
Adds Div node to an onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Log
Adds Log node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Mul
Adds Mul node to an onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Neg
Adds Neg node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Pow
Adds Pow node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.ReduceAllL2
Adds ReduceAllL2 node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.ReduceMean
Adds ReduceMean node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.ReduceSum
Adds ReduceSum node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Sigmoid
Adds Sigmoid node to the onnx model.
classorttraining.orttraining.python.training.onnxblock.blocks.Sub
Adds Sub node to an onnx model.
classorttraining.orttraining.python.training.optim.fused_adam.FusedAdam
Implements Adam algorithm.
classorttraining.orttraining.python.training.ort_triton._codegen.TritonCodegen
Specialized codegen for Triton backend.
classorttraining.orttraining.python.training.ort_triton._common.CodegenContext
record variable name mapping in term of IRnodes.
classorttraining.orttraining.python.training.ort_triton._common.TensorInfo
Represent a input/output tensor of a node.
classorttraining.orttraining.python.training.ort_triton._ir.ComputeNode
Each operator is represented as a ComputeNode.
classorttraining.orttraining.python.training.ort_triton._ir.IRNode
The base class for all IR nodes.
classorttraining.orttraining.python.training.ort_triton._ir.ReduceForLoopEnd
shared-memory reduction
classorttraining.orttraining.python.training.ort_triton._sorted_graph.SortedGraph
This class is used to 1.
funcorttraining.orttraining.python.training.ort_triton._utils.next_power_of_2(n:int) -> int
Return the smallest power of 2 greater than or equal to n
classorttraining.orttraining.python.training.ortmodule._execution_agent.ExecutionAgentOutput
Wraps an OrtValue and adds an ID.
classorttraining.orttraining.python.training.ortmodule._graph_transition_manager.GraphTransitionManager
Manage the graph transition from 1).
funcorttraining.orttraining.python.training.ortmodule._io.calculate_total_parameter_size_in_bytes(module:torch.nn.Module) -> int
Calculate the total parameter size in bytes
classorttraining.orttraining.python.training.ortmodule._onnx_models.ONNXModels
Encapsulates all ORTModule onnx models.
methodorttraining.orttraining.python.training.ortmodule._runtime_inspector.MemoryObserver.is_enabled() -> bool
Check if memory inspector is enabled.
classorttraining.orttraining.python.training.ortmodule._runtime_inspector.RuntimeInspector
Runtime inspector for ORTModule.
funcorttraining.orttraining.python.training.ortmodule._utils.get_rank() -> int
Returns the rank of the current process.
funcorttraining.orttraining.python.training.ortmodule._utils.get_world_size() -> int
Returns the world size of the current process.
classorttraining.orttraining.python.training.ortmodule.experimental.pipe._ort_pipeline_module.ORTPipelineModule
ORTPipelineModule pipeline module.
classorttraining.orttraining.python.training.ortmodule.graph_optimizers.utils.GraphMatcher
Sub-graph matcher with given pattern.
classorttraining.orttraining.python.training.ortmodule.options.DebugOptions
Configurable debugging options for ORTModule.
classorttraining.orttraining.python.training.utils.ptable.PTable
A table that can be printed to the console.
methodorttraining.orttraining.python.training.utils.ptable.PTable.add_row(columns:list[str]) -> Row
Add a row to the table.
methodorttraining.orttraining.python.training.utils.ptable.PTable.get_string(first_column_width=None, second_column_width=None) -> str
Serialize the table to a string.
classorttraining.orttraining.python.training.utils.ptable.Row
A row in a PTable
classorttraining.orttraining.python.training.utils.torch_io_helper.PrimitiveType
Helper class for Python primitive types.
methodorttraining.orttraining.python.training.utils.torch_io_helper.PrimitiveType.get_tensor(value, device) -> torch.Tensor
Convert `value` to a torch.Tensor.
classplugin-ep-cuda.csharp.pack_nuget.PackError
Raised for any user-actionable failure during packaging.
funcplugin-ep-cuda.csharp.pack_nuget.stage_sources(staging_dir:Path) -> None
Copy project sources into staging, excluding bin/obj.
funcplugin-ep-cuda.python.onnxruntime_ep_cuda.get_ep_name() -> str
Return the CUDA plugin Execution Provider name.
funcplugin-ep-webgpu.csharp.pack_nuget.stage_sources(staging_dir:Path) -> None
Copy project sources into staging, excluding bin/obj.
funcplugin-ep-webgpu.python.build_wheel.build_wheel(source_dir:Path, wheel_dir:Path)
Build the wheel using pip.
funcplugin-ep-webgpu.python.onnxruntime_ep_webgpu.get_ep_name() -> str
Return the WebGPU Execution Provider name.

About this data

These signatures were extracted from the public source of microsoft/onnxruntime using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries