ray.rllib.policy.torch_policy_v2.TorchPolicyV2.export_model#
- 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.
- Parameters:
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.