Class - VerifiableDatasetInfo#

class openfl.federated.data.sources.verifiable_dataset_info.VerifiableDatasetInfo(data_sources, label, metadata=None, root_hash=None)[source]#

Bases: object

This class represents a data set whose integrity can be verified. It contains multiple data sources and methods to compute data commitments, verification, as well as utilities for serialization and deserialization.

Parameters:
__init__(data_sources, label, metadata=None, root_hash=None)[source]#
Parameters:

Methods

__init__(data_sources, label[, metadata, ...])

create_dataset_hash()

Create and return the root_hash of all files hashes.

from_json(json_str[, base_path])

Deserialize the VerifiableDatasetInfo from JSON

to_json()

verify_dataset([root_hash])

Verify the dataset against root_hash.

verify_single_file(file_path, file_hash)

Verify the hash of a single file.

create_dataset_hash()[source]#

Create and return the root_hash of all files hashes.

static from_json(json_str, base_path=None)[source]#

Deserialize the VerifiableDatasetInfo from JSON

verify_dataset(root_hash=None)[source]#

Verify the dataset against root_hash.

verify_single_file(file_path, file_hash)[source]#

Verify the hash of a single file.