unilab.training.onnx_export.export_policy_onnx

unilab.training.onnx_export.export_policy_onnx(export_module, onnx_path, export_inputs, *, input_names, output_names=None, opset_version=17)[source]

Export export_module to onnx_path and print the artifact path.

Parameters:
  • export_module (Module) – Module traced by torch.onnx.export.

  • onnx_path (str) – Destination file path for the exported graph.

  • export_inputs (tuple[Tensor, ...]) – Positional example inputs matching input_names.

  • input_names (list[str]) – ONNX input names, aligned positionally with export_inputs.

  • output_names (list[str] | None) – ONNX output names; defaults to ["action"].

  • opset_version (int) – ONNX opset version; defaults to 17.

Return type:

None