save (pmrf.save)
- pmrf.save(target: str | PathLike | BinaryIO, tree: Any)
(experimental) Save a ParamRF Model (or any Parax PyTree) to a file.
Note that this function is experimental, and may break between version releases.
Automatically appends the ‘.prf’ (ParamRF) extension to the target path if no file extension is provided. This enforces the ParamRF file convention while delegating the underlying serialization to Parax.
- Parameters:
target (str, os.PathLike, or BinaryIO) – The path to the saved file or an open file-like object.
tree (Any) – The PyTree containing the ParamRF model to save.