The following repo aims at extending dEngine with the UCI datasets.
It plugs into dEngine's usual config system (BUILTINS, load_experiment_from_yamls, etc.) and adds:
- dataset targets for datasets hosted on the UCI ML Repository, wrapped so they can be used as regular dEngine
datasetconfig entries - matching model architectures where needed
- ready-to-use builtin configs (
uci_BUILTINS) that bundle a dataset + model + sensible default training engine, so they can be dropped straight into a dEngine experiment config list
pip install https://github.com/DecentralizedLearning/dengine-uciml
Builtins live under dengine_uciml.configs.builtins.BUILTINS, mirroring the structure of dEngine's own BUILTINS.
Human Activity Recognition (HAR) dataset from smartphone sensor data, US variant. Config file: configs/datasets/HAR-US.yml.
A fully working example is provided in main.py. The important steps:
-
Import the plugin's builtins alongside dEngine's core ones:
from dengine.config.builtins import BUILTINS from dengine_uciml.configs.builtins import BUILTINS as uci_BUILTINS
-
Compose a config file list by mixing dEngine core configs (scenario, graph, partitioning) with a
uci_BUILTINSdataset entry, exactly as you would with any other dEngine dataset builtin:FEDERATED_CONFIGS = [ BUILTINS.CORE.SCENARIOS.DECENTRALIZED_HOMOGENOUS, BUILTINS.CORE.GRAPH.STAR_51, BUILTINS.CORE.PARTITIONING.NONIID, uci_BUILTINS.DATASETS.HAR_US, ]
-
Load and run as usual with
load_experiment_from_yamls/load_engine:experiment = load_experiment_from_yamls( files=FEDERATED_CONFIGS, overrides=convert_to_nested_dict({ "name": "cifar10,FedAvg", # any client/training_engine/etc. overrides }), experiments_directory_root=str(simulation_args.output_directory.absolute()), seed=simulation_args.seed, )
Because uci_BUILTINS.DATASETS.HAR_US already ships a client.local_model and client.training_engine block, you don't need to redefine those unless you want to override them (e.g. switching client.target to DecAvgClient for decentralized runs, as main.py does).
Tip
Faster training on GPU: set these before running.
export TORCH_CUDNN_BENCHMARK=True
export TORCH_CUDNN_DETERMINISTIC=FalseResults will no longer be bit-for-bit reproducible between runs.
Run with export PYTHON_GIL=0 python ... --num_parallel_clients 50