|
17 | 17 | }, |
18 | 18 | { |
19 | 19 | "cell_type": "code", |
20 | | - "execution_count": 1, |
| 20 | + "execution_count": null, |
21 | 21 | "metadata": {}, |
22 | 22 | "outputs": [], |
23 | 23 | "source": [ |
|
27 | 27 | }, |
28 | 28 | { |
29 | 29 | "cell_type": "code", |
30 | | - "execution_count": 2, |
| 30 | + "execution_count": null, |
31 | 31 | "metadata": {}, |
32 | 32 | "outputs": [], |
33 | 33 | "source": [ |
|
59 | 59 | }, |
60 | 60 | { |
61 | 61 | "cell_type": "code", |
62 | | - "execution_count": 3, |
| 62 | + "execution_count": null, |
63 | 63 | "metadata": {}, |
64 | 64 | "outputs": [], |
65 | 65 | "source": [ |
|
106 | 106 | }, |
107 | 107 | { |
108 | 108 | "cell_type": "code", |
109 | | - "execution_count": 4, |
| 109 | + "execution_count": null, |
110 | 110 | "metadata": {}, |
111 | 111 | "outputs": [], |
112 | 112 | "source": [ |
|
256 | 256 | }, |
257 | 257 | { |
258 | 258 | "cell_type": "code", |
259 | | - "execution_count": 5, |
| 259 | + "execution_count": null, |
260 | 260 | "metadata": {}, |
261 | 261 | "outputs": [], |
262 | 262 | "source": [ |
|
345 | 345 | }, |
346 | 346 | { |
347 | 347 | "cell_type": "code", |
348 | | - "execution_count": 6, |
| 348 | + "execution_count": null, |
349 | 349 | "metadata": {}, |
350 | 350 | "outputs": [], |
351 | 351 | "source": [ |
|
489 | 489 | }, |
490 | 490 | { |
491 | 491 | "cell_type": "code", |
492 | | - "execution_count": 7, |
| 492 | + "execution_count": null, |
493 | 493 | "metadata": {}, |
494 | 494 | "outputs": [], |
495 | 495 | "source": [ |
|
606 | 606 | "- ```device``` : Which device to use for training and validation" |
607 | 607 | ] |
608 | 608 | }, |
| 609 | + { |
| 610 | + "cell_type": "markdown", |
| 611 | + "metadata": {}, |
| 612 | + "source": [ |
| 613 | + "## Setting up the experiment\n", |
| 614 | + "Now that we've defined our custom functions, the last thing to do is to configure the experiment. The following cell shows the various settings you can change in your experiment.\n", |
| 615 | + "\n", |
| 616 | + "Note that ```rounds_to_train``` can be set as high as you want. However, the experiment will exit once the simulated time value exceeds 1 week of simulated time, or if the specified number of rounds has completed." |
| 617 | + ] |
| 618 | + }, |
609 | 619 | { |
610 | 620 | "cell_type": "code", |
611 | 621 | "execution_count": null, |
612 | 622 | "metadata": {}, |
613 | 623 | "outputs": [], |
614 | 624 | "source": [ |
| 625 | + "# change any of these you wish to your custom functions. You may leave defaults if you wish.\n", |
615 | 626 | "aggregation_function = weighted_average_aggregation\n", |
616 | 627 | "choose_training_collaborators = all_collaborators_train\n", |
617 | 628 | "training_hyper_parameters_for_round = constant_hyper_parameters\n", |
618 | 629 | "validation_functions = [('sensitivity', sensitivity), ('specificity', specificity)]\n", |
| 630 | + "\n", |
| 631 | + "# Final scoring will be on partitioning_1, partitioning_2, and a hidden partitioning\n", |
| 632 | + "# We encourage you to experiment with other partitionings\n", |
619 | 633 | "institution_split_csv_filename = 'partitioning_1.csv'\n", |
| 634 | + "\n", |
| 635 | + "# change this to point to the parent directory of the data\n", |
620 | 636 | "brats_training_data_parent_dir = '/raid/datasets/FeTS21/MICCAI_FeTS2021_TrainingData'\n", |
| 637 | + "\n", |
| 638 | + "# increase this if you need a longer history for your algorithms\n", |
| 639 | + "# decrease this if you need to reduce system RAM consumption\n", |
621 | 640 | "db_store_rounds = 5\n", |
622 | | - "rounds_to_train = 5\n", |
| 641 | + "\n", |
| 642 | + "# this is passed to PyTorch, so set it accordingly for your system\n", |
623 | 643 | "device = 'cuda'\n", |
624 | 644 | "\n", |
625 | | - "run_challenge_experiment(aggregation_function=aggregation_function,\n", |
626 | | - " choose_training_collaborators=choose_training_collaborators,\n", |
627 | | - " training_hyper_parameters_for_round=training_hyper_parameters_for_round,\n", |
628 | | - " validation_functions=validation_functions,\n", |
629 | | - " institution_split_csv_filename=institution_split_csv_filename,\n", |
630 | | - " brats_training_data_parent_dir=brats_training_data_parent_dir,\n", |
631 | | - " db_store_rounds=db_store_rounds,\n", |
632 | | - " rounds_to_train=rounds_to_train,\n", |
633 | | - " device=device)" |
| 645 | + "# you'll want to increase this most likely. You can set it as high as you like, \n", |
| 646 | + "# however, the experiment will exit once the simulated time exceeds one week. \n", |
| 647 | + "rounds_to_train = 5" |
| 648 | + ] |
| 649 | + }, |
| 650 | + { |
| 651 | + "cell_type": "code", |
| 652 | + "execution_count": null, |
| 653 | + "metadata": {}, |
| 654 | + "outputs": [], |
| 655 | + "source": [ |
| 656 | + "# the scores are returned in a Pandas dataframe\n", |
| 657 | + "scores_dataframe = run_challenge_experiment(\n", |
| 658 | + " aggregation_function=aggregation_function,\n", |
| 659 | + " choose_training_collaborators=choose_training_collaborators,\n", |
| 660 | + " training_hyper_parameters_for_round=training_hyper_parameters_for_round,\n", |
| 661 | + " validation_functions=validation_functions,\n", |
| 662 | + " institution_split_csv_filename=institution_split_csv_filename,\n", |
| 663 | + " brats_training_data_parent_dir=brats_training_data_parent_dir,\n", |
| 664 | + " db_store_rounds=db_store_rounds,\n", |
| 665 | + " rounds_to_train=rounds_to_train,\n", |
| 666 | + " device=device)" |
634 | 667 | ] |
635 | 668 | }, |
636 | 669 | { |
637 | 670 | "cell_type": "code", |
638 | 671 | "execution_count": null, |
639 | 672 | "metadata": {}, |
640 | 673 | "outputs": [], |
641 | | - "source": [] |
| 674 | + "source": [ |
| 675 | + "scores_dataframe" |
| 676 | + ] |
642 | 677 | } |
643 | 678 | ], |
644 | 679 | "metadata": { |
645 | 680 | "kernelspec": { |
646 | | - "display_name": "fets_challenge_test_2", |
| 681 | + "display_name": "openfl", |
647 | 682 | "language": "python", |
648 | | - "name": "fets_challenge_test_2" |
| 683 | + "name": "openfl" |
649 | 684 | }, |
650 | 685 | "language_info": { |
651 | 686 | "codemirror_mode": { |
|
657 | 692 | "name": "python", |
658 | 693 | "nbconvert_exporter": "python", |
659 | 694 | "pygments_lexer": "ipython3", |
660 | | - "version": "3.6.12" |
| 695 | + "version": "3.6.13" |
661 | 696 | } |
662 | 697 | }, |
663 | 698 | "nbformat": 4, |
|
0 commit comments