Skip to content

declearn.quickrun.DataSourceConfig

Bases: TomlConfig

Dataclass associated with the quickrun's parse_data_folder function.

Attributes:

Name Type Description
data_folder str

Absolute path to the to the main folder hosting the data.

client_names list or None

List of custom client names to look for in the data folder. If None, default to all subdirectories of the data folder.

dataset_names dict or None

Dict of custom dataset names, to look for in each client folder. Expect 'train_data, train_target, valid_data, valid_target' as keys. If None, files will be expected to be prefixed using the former keys.

Source code in declearn/quickrun/_config.py
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@dataclasses.dataclass
class DataSourceConfig(TomlConfig):
    """Dataclass associated with the quickrun's `parse_data_folder` function.

    Attributes
    ----------
    data_folder: str
        Absolute path to the to the main folder hosting the data.
    client_names: list or None
        List of custom client names to look for in the data folder.
        If None, default to all subdirectories of the data folder.
    dataset_names: dict or None
        Dict of custom dataset names, to look for in each client folder.
        Expect 'train_data, train_target, valid_data, valid_target' as keys.
        If None, files will be expected to be prefixed using the former keys.
    """

    data_folder: Optional[str] = None
    client_names: Optional[List[str]] = None
    dataset_names: Optional[Dict[str, str]] = None