|
46 | 46 | "metadata": {}, |
47 | 47 | "outputs": [], |
48 | 48 | "source": [ |
49 | | - "!python -c \"import monai\" || pip install -q git+https://github.com/Project-MONAI/MONAI#egg=MONAI[gdown,ignite,torchvision,cucim]\n", |
| 49 | + "!python -c \"import monai\" || pip install -q \"monai-weekly[gdown,ignite,torchvision,cucim]\"\n", |
50 | 50 | "!python -c \"import ignite\" || pip install -q pytorch-ignite\n", |
51 | 51 | "!python -c \"import torchvision\" || pip install -q torchvision\n", |
52 | 52 | "!python -c \"import cucim\" || pip install -q cucim\n", |
|
568 | 568 | "\n", |
569 | 569 | "# Nsys output column names are different in different versions, \n", |
570 | 570 | "# so we need to find the corresponding columns\n", |
571 | | - "avg_col = [c for c in summary.columns if c.startswith('Av')] \n", |
| 571 | + "avg_col = [c for c in summary.columns if c.startswith('Av')]\n", |
572 | 572 | "std_col = [c for c in summary.columns if c.startswith('Std')]\n", |
573 | | - "min_col = [c for c in summary.columns if c.startswith('Min')] \n", |
574 | | - "max_col = [c for c in summary.columns if c.startswith('Max')] \n", |
| 573 | + "min_col = [c for c in summary.columns if c.startswith('Min')]\n", |
| 574 | + "max_col = [c for c in summary.columns if c.startswith('Max')]\n", |
575 | 575 | "\n", |
576 | 576 | "# Normalize each transform range with total average time (percentage of transform time)\n", |
577 | 577 | "summary[[\"avg%\", \"std%\", 'min%', 'max%']] = summary[avg_col+std_col+min_col+max_col] / summary[avg_col].sum()[0] * 100\n", |
|
662 | 662 | "axes[-1].set_xticks(range(0, 101, 10))\n", |
663 | 663 | "axes[-1].set_xlabel(\"% of preprocessing time\", fontsize=20)" |
664 | 664 | ] |
665 | | - }, |
666 | | - { |
667 | | - "cell_type": "code", |
668 | | - "execution_count": null, |
669 | | - "metadata": {}, |
670 | | - "outputs": [], |
671 | | - "source": [] |
672 | 665 | } |
673 | 666 | ], |
674 | 667 | "metadata": { |
675 | 668 | "interpreter": { |
676 | 669 | "hash": "98b0a9b7b4eaaa670588a142fd0a9b87eaafe866f1db4228be72b4211d12040f" |
677 | 670 | }, |
678 | 671 | "kernelspec": { |
679 | | - "display_name": "Python 3.8.10 64-bit ('base': conda)", |
| 672 | + "display_name": "Python 3 (ipykernel)", |
| 673 | + "language": "python", |
680 | 674 | "name": "python3" |
681 | 675 | }, |
682 | 676 | "language_info": { |
|
689 | 683 | "name": "python", |
690 | 684 | "nbconvert_exporter": "python", |
691 | 685 | "pygments_lexer": "ipython3", |
692 | | - "version": "3.8.12" |
| 686 | + "version": "3.8.13" |
693 | 687 | } |
694 | 688 | }, |
695 | 689 | "nbformat": 4, |
|
0 commit comments