torchwrench.serialization.dump_fn module¶
-
torchwrench.serialization.dump_fn.dump(obj: Any, fpath: str | Path | PathLike | None | BinaryIO =
None, *args, saving_backend: 'csv' | 'json' | 'jsonl' | 'h5py' | 'numpy' | 'pickle' | 'safetensors' | 'torch' | 'torchaudio' | 'yaml' | None ='torch', **kwargs) str | bytes[source]¶ Save to file using the correct backend.
-
torchwrench.serialization.dump_fn.dump_to(obj: Any, fpath: str | Path | PathLike | None | BinaryIO =
None, *args, saving_backend: 'csv' | 'json' | 'jsonl' | 'h5py' | 'numpy' | 'pickle' | 'safetensors' | 'torch' | 'torchaudio' | 'yaml' | None ='torch', **kwargs) str | bytes[source]¶ Save to file using the correct backend.
-
torchwrench.serialization.dump_fn.save(obj: Any, fpath: str | Path | PathLike | None | BinaryIO =
None, *args, saving_backend: 'csv' | 'json' | 'jsonl' | 'h5py' | 'numpy' | 'pickle' | 'safetensors' | 'torch' | 'torchaudio' | 'yaml' | None ='torch', **kwargs) str | bytes[source]¶ Save to file using the correct backend.
-
torchwrench.serialization.dump_fn.save_to(obj: Any, fpath: str | Path | PathLike | None | BinaryIO =
None, *args, saving_backend: 'csv' | 'json' | 'jsonl' | 'h5py' | 'numpy' | 'pickle' | 'safetensors' | 'torch' | 'torchaudio' | 'yaml' | None ='torch', **kwargs) str | bytes[source]¶ Save to file using the correct backend.