ray.rllib.algorithms.algorithm.Algorithm.export_policy_model#

Algorithm.export_policy_model(export_dir: str, policy_id: str = 'default_policy', onnx: int | None = None) None[source]#

Exports policy model with given policy_id to a local directory.

Parameters:
  • export_dir – Writable local directory.

  • policy_id – Optional policy id to export.

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