torchoutil.serialization.pickle module

dump_pickle(
obj: Any,
fpath: str | Path | PathLike | None,
*,
overwrite: bool = True,
make_parents: bool = True,
to_builtins: bool = False,
) bytes[source]

Dump content to PICKLE format into a bytes and/or file.

to_pickle(
obj: Any,
fpath: str | Path | PathLike | None,
*,
overwrite: bool = True,
make_parents: bool = True,
to_builtins: bool = False,
) bytes[source]

Dump content to PICKLE format into a bytes and/or file.