load
Function
Loads the persistent object of the save or multi_save API from a file.
Format
mindio_acp.load(path, open_way='memfs', map_location=None)
Parameters
Parameter |
Mandatory/Optional |
Description |
Value |
|---|---|---|---|
path |
Mandatory |
Loading path |
Valid file path |
open_way |
Optional |
Loading mode.
memfs is used by default. |
|
map_location |
Optional |
Device to be mapped during loading. None is used by default. |
|
Usage Example
>>> # load from file
>>> mindio_acp.load('/mnt/dpc01/checkpoint/rank-0.pt')
Return Value
Any
Similar to the load API of PyTorch, this API also uses the pickle module, which may be attacked through maliciously constructed data during unpickle. Ensure that the source of the data to be loaded is secure. Only trusted data can be loaded.
Parent topic: API Reference