Skip to content

export.export_onnx_from_policy

Full path: schola.rllib.export.export_onnx_from_policy

Export an RLlib policy to ONNX format.

export_onnx_from_policy(arg, path)

Parameters

  • arg (Policy) - The policy to export. Can be: - A Policy object - A dictionary mapping policy names to Policy objects - A string path to a policy checkpoint - A pathlib.Path object to a policy checkpoint

  • path (str) - The directory path where the ONNX model will be saved.

  • policy_name (str) - The name to use for the exported policy file. If None, uses “Policy” as default.