Class - VerifiableDatasetInfo#
- class openfl.federated.data.sources.verifiable_dataset_info.VerifiableDatasetInfo(data_sources, label, metadata=None, root_hash=None)[source]#
Bases:
objectThis 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:
data_sources (List[DataSource])
label (str)
- __init__(data_sources, label, metadata=None, root_hash=None)[source]#
- Parameters:
data_sources (List[DataSource])
label (str)
Methods
__init__(data_sources, label[, metadata, ...])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.