Skip to content

Checkpoint

rotated.read_metadata(checkpoint_path)

체크포인트 파일의 metadata 섹션 데이터를 읽어옵니다.

Parameters:

Name Type Description Default
checkpoint_path str

checkpoint_path

required

Returns:

Type Description
Union[Dict, bool]

Union[Dict, bool]: 체크포인트 버전이 맞지 않는 경우 False 값을 리턴

Raises:

Type Description
ModelFileNotFoundError

checkpoint_path에 해당하는 파일이 없는 경우

rotated.write_metadata(checkpoint_path, metadata)

체크포인트 파일의 metadata 섹션 데이터를 수정해 저장합니다.

Parameters:

Name Type Description Default
checkpoint_path str

checkpoint_path

required
metadata Dict

metadata

required

Returns:

Name Type Description
bool bool

체크포인트 버전이 맞지 않는 경우 False 값을 리턴

Raises:

Type Description
ModelFileNotFoundError

checkpoint_path에 해당하는 파일이 없는 경우