multi_save
Function
Saves one piece of data to multiple files.
Format
mindio_acp.multi_save(obj, path_list)
Parameters
Parameter |
Mandatory/Optional |
Description |
Value |
|---|---|---|---|
obj |
Mandatory |
Object to be saved |
Valid data object |
path_list |
Mandatory |
List of data storage paths |
List of valid file paths |
Usage Example
>>> # Save to file >>> x = torch.tensor([0, 1, 2, 3, 4]) >>> path_list = ["/mnt/dpc01/dir1/rank_1.pt","/mnt/dpc01/dir2/rank_1.pt"] >>> mindio_acp.multi_save(x, path_list)
Return Value
- None: failure
- 0: Save data using the native torch.save mode.
- 1: Save data using the memfs mode.
- 2: Save data using the fopen mode.
Parent topic: API Reference