Documentation for Api Module¶
delete_certs()
¶
Remove all certificate files from the system.
Source code in nebula/physical/api.py
226 227 228 229 230 231 232 233 234 |
|
delete_config()
¶
Remove the config .json from the given run directory.
Source code in nebula/physical/api.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
delete_dataset()
¶
Delete both dataset .h5 files from the specified run directory.
Source code in nebula/physical/api.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
delete_logs()
¶
Delete the main .log for the requested run.
Source code in nebula/physical/api.py
256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
|
get_certs()
¶
Download every .cert file in a ZIP archive.
Source code in nebula/physical/api.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
get_config()
¶
Return the single .json config file for the requested run.
Source code in nebula/physical/api.py
77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
get_dataset()
¶
Deliver both .h5 datasets as a single ZIP archive.
Returning a single payload simplifies transfer, cache-control and client code compared to sending two independent responses.
Source code in nebula/physical/api.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
get_logs()
¶
Download the main .log produced during training.
Source code in nebula/physical/api.py
247 248 249 250 251 252 253 |
|
get_metrics()
¶
Bundle every file under METRICS_FOLDER into a ZIP archive.
Source code in nebula/physical/api.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
|
run()
¶
Spawn the federated training process (once).
Returns¶
JSON {pid, state}
Source code in nebula/physical/api.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
|
set_cert()
¶
Upload one .cert file to the global certificates folder.
Source code in nebula/physical/api.py
213 214 215 216 217 218 219 220 221 222 223 |
|
set_config()
¶
Upload a config .json for the provided run directory.
Source code in nebula/physical/api.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
set_dataset()
¶
Upload the pair of train/test .h5 files for a run.
Source code in nebula/physical/api.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
setup_new_run()
¶
Prepare a new federated-learning round.
Expected multipart-form fields¶
- config – JSON with scenario, network and security arguments
- global_test – shared evaluation dataset (
*.h5
) - train_set – participant-specific training dataset (
*.h5
)
The function rewrites paths inside config, validates neighbour IPs through Tailscale, deletes previous artefacts and finally stores the new trio of files.
Source code in nebula/physical/api.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
|
stop()
¶
Terminate the running training process (SIGTERM) and wait for it.
Source code in nebula/physical/api.py
359 360 361 362 363 364 365 366 367 368 369 370 371 |
|