convert

Function

Converts the checkpoint file in MindIO ACP format to the native format of Torch.

Format

mindio_acp.convert(src, dst)

Parameters

Parameter

Mandatory/Optional

Description

Value

src

Mandatory

Source path or file to be converted. The source path or file must exist.

Valid file path, which cannot contain soft links.

dst

Mandatory

Destination path or file to be converted. The parent directory of the specified path must exist. If the file already exists, it will be overwritten.

Valid file path, which cannot contain soft links.

Usage Example

>>> mindio_acp.convert('/mnt/dpc01/iter_0000050/mp_rank_00/distrib_optim.pt', '/mnt/dpc02/iter_0000050/mp_rank_00/distrib_optim.pt')

Return Value

  • 0: Conversion succeeded.
  • -1: Conversion failed.