declearn.quickrun.quickrun
Run a server and its clients parallelly using asyncio.
The script requires to be provided with the path to a TOML file with all the elements required to configurate an FL experiment, or the path to a folder containing :
- A TOML file with all the elements required to configure an FL experiment.
- A python file in which a declearn model is instantiated (in main scope).
- A data folder, structured in a specific way: folder/ [client_a]/ train_data.(csv|npy|sparse|svmlight) train_target.(csv|npy|sparse|svmlight) valid_data.(csv|npy|sparse|svmlight) valid_target.(csv|npy|sparse|svmlight) [client_b]/ ... ...
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
str
|
Path to either a toml file or a properly formatted folder containing the elements required to launch the experiment. |
required |
Notes
- The data folder structure may be obtained by using the
declearn-split
commandline entry-point, or thedeclearn.dataset.split_data
util. - The quickrun mode works by simulating a federated learning process, where all clients operate under parallel python processes, and communicate over the localhost using un-encrypted websockets communications.
- When run without any argument, this script/function operates on a basic MNIST example, for demonstration purposes.
- You may refer to a more detailed MNIST example on our GitLab repository.
See the
examples/mnist_quickrun
folder.
Source code in declearn/quickrun/_run.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|