sagemaker.serve.validations.check_integrity

sagemaker.serve.validations.check_integrity#

Validates the integrity of pickled file with SHA-256 hash.

Functions

compute_hash(buffer)

Compute SHA-256 hash of the given buffer.

perform_integrity_check(buffer, metadata_path)

Validates the integrity of bytes by comparing the hash value.

sagemaker.serve.validations.check_integrity.compute_hash(buffer: bytes) str[source]#

Compute SHA-256 hash of the given buffer.

sagemaker.serve.validations.check_integrity.perform_integrity_check(buffer: bytes, metadata_path: Path)[source]#

Validates the integrity of bytes by comparing the hash value.