TorchPolicyV2.export_model(export_dir: str, onnx: int | None = None) None[source]#

Exports the Policy’s Model to local directory for serving.

Creates a TorchScript model and saves it.

  • export_dir – Local writable directory or filename.

  • onnx – If given, will export model in ONNX format. The value of this parameter set the ONNX OpSet version to use.