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

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

Note: The file format will depend on the deep learning framework used. See the child classed of Policy and their export_model implementations for more details.

  • export_dir – Local writable directory.

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

  • ValueError – If a native DL-framework based model (e.g. a keras Model)

  • cannot be saved to disk for various reasons.