|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
| 7 | + "Copyright (c) MONAI Consortium \n", |
| 8 | + "Licensed under the Apache License, Version 2.0 (the \"License\"); \n", |
| 9 | + "you may not use this file except in compliance with the License. \n", |
| 10 | + "You may obtain a copy of the License at \n", |
| 11 | + " http://www.apache.org/licenses/LICENSE-2.0 \n", |
| 12 | + "Unless required by applicable law or agreed to in writing, software \n", |
| 13 | + "distributed under the License is distributed on an \"AS IS\" BASIS, \n", |
| 14 | + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n", |
| 15 | + "See the License for the specific language governing permissions and \n", |
| 16 | + "limitations under the License.\n", |
| 17 | + "\n", |
7 | 18 | "# Multi GPU Test\n",
|
8 | 19 | "\n",
|
9 | 20 | "[](https://colab.research.google.com/github/Project-MONAI/tutorials/blob/main/acceleration/multi_gpu_test.ipynb)"
|
|
18 | 29 | },
|
19 | 30 | {
|
20 | 31 | "cell_type": "code",
|
21 |
| - "execution_count": 1, |
| 32 | + "execution_count": null, |
22 | 33 | "metadata": {
|
23 | 34 | "tags": []
|
24 | 35 | },
|
25 |
| - "outputs": [ |
26 |
| - { |
27 |
| - "name": "stdout", |
28 |
| - "output_type": "stream", |
29 |
| - "text": [ |
30 |
| - "Note: you may need to restart the kernel to use updated packages.\n" |
31 |
| - ] |
32 |
| - } |
33 |
| - ], |
| 36 | + "outputs": [], |
34 | 37 | "source": [
|
35 | 38 | "!python -c \"import monai\" || pip install -q \"monai-weekly[ignite]\""
|
36 | 39 | ]
|
|
44 | 47 | },
|
45 | 48 | {
|
46 | 49 | "cell_type": "code",
|
47 |
| - "execution_count": 1, |
| 50 | + "execution_count": null, |
48 | 51 | "metadata": {
|
49 | 52 | "tags": []
|
50 | 53 | },
|
|
53 | 56 | "name": "stdout",
|
54 | 57 | "output_type": "stream",
|
55 | 58 | "text": [
|
56 |
| - "MONAI version: 0.4.0\n", |
57 |
| - "Numpy version: 1.19.1\n", |
58 |
| - "Pytorch version: 1.7.0a0+7036e91\n", |
59 |
| - "MONAI flags: HAS_EXT = False, USE_COMPILED = False\n", |
60 |
| - "MONAI rev id: 0563a4467fa602feca92d91c7f47261868d171a1\n", |
| 59 | + "MONAI version: 1.1.0+2.g97918e46\n", |
| 60 | + "Numpy version: 1.22.2\n", |
| 61 | + "Pytorch version: 1.13.0a0+d0d6b1f\n", |
| 62 | + "MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n", |
| 63 | + "MONAI rev id: 97918e46e0d2700c050e678d72e3edb35afbd737\n", |
| 64 | + "MONAI __file__: /workspace/monai/monai-in-dev/monai/__init__.py\n", |
61 | 65 | "\n",
|
62 | 66 | "Optional dependencies:\n",
|
63 |
| - "Pytorch Ignite version: 0.4.2\n", |
64 |
| - "Nibabel version: 3.2.1\n", |
65 |
| - "scikit-image version: 0.15.0\n", |
66 |
| - "Pillow version: 8.0.1\n", |
67 |
| - "Tensorboard version: 2.2.0\n", |
68 |
| - "gdown version: 3.12.2\n", |
69 |
| - "TorchVision version: 0.8.0a0\n", |
70 |
| - "ITK version: 5.1.2\n", |
71 |
| - "tqdm version: 4.54.1\n", |
72 |
| - "lmdb version: 1.0.0\n", |
73 |
| - "psutil version: 5.7.2\n", |
| 67 | + "Pytorch Ignite version: 0.4.10\n", |
| 68 | + "Nibabel version: 4.0.2\n", |
| 69 | + "scikit-image version: 0.19.3\n", |
| 70 | + "Pillow version: 9.0.1\n", |
| 71 | + "Tensorboard version: 2.10.1\n", |
| 72 | + "gdown version: 4.6.0\n", |
| 73 | + "TorchVision version: 0.14.0a0\n", |
| 74 | + "tqdm version: 4.64.1\n", |
| 75 | + "lmdb version: 1.3.0\n", |
| 76 | + "psutil version: 5.9.2\n", |
| 77 | + "pandas version: 1.4.4\n", |
| 78 | + "einops version: 0.6.0\n", |
| 79 | + "transformers version: 4.21.3\n", |
| 80 | + "mlflow version: 2.0.1\n", |
| 81 | + "pynrrd version: 1.0.0\n", |
74 | 82 | "\n",
|
75 | 83 | "For details about installing the optional dependencies, please visit:\n",
|
76 | 84 | " https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n",
|
|
79 | 87 | }
|
80 | 88 | ],
|
81 | 89 | "source": [
|
82 |
| - "# Copyright 2020 MONAI Consortium\n", |
83 |
| - "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", |
84 |
| - "# you may not use this file except in compliance with the License.\n", |
85 |
| - "# You may obtain a copy of the License at\n", |
86 |
| - "# http://www.apache.org/licenses/LICENSE-2.0\n", |
87 |
| - "# Unless required by applicable law or agreed to in writing, software\n", |
88 |
| - "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", |
89 |
| - "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", |
90 |
| - "# See the License for the specific language governing permissions and\n", |
91 |
| - "# limitations under the License.\n", |
92 |
| - "\n", |
93 | 90 | "import torch\n",
|
94 | 91 | "from monai.config import print_config\n",
|
95 | 92 | "from monai.engines import create_multigpu_supervised_trainer\n",
|
|
107 | 104 | },
|
108 | 105 | {
|
109 | 106 | "cell_type": "code",
|
110 |
| - "execution_count": 2, |
| 107 | + "execution_count": null, |
111 | 108 | "metadata": {},
|
112 | 109 | "outputs": [],
|
113 | 110 | "source": [
|
|
142 | 139 | },
|
143 | 140 | {
|
144 | 141 | "cell_type": "code",
|
145 |
| - "execution_count": 3, |
| 142 | + "execution_count": null, |
146 | 143 | "metadata": {
|
147 | 144 | "pycharm": {
|
148 | 145 | "name": "#%%\n"
|
149 | 146 | }
|
150 | 147 | },
|
151 | 148 | "outputs": [
|
| 149 | + { |
| 150 | + "name": "stdout", |
| 151 | + "output_type": "stream", |
| 152 | + "text": [ |
| 153 | + "2023-01-20 14:16:00,009 - Engine run starting with max_epochs=2.\n", |
| 154 | + "2023-01-20 14:16:00,189 - Epoch[1] Complete. Time taken: 00:00:00.180\n", |
| 155 | + "2023-01-20 14:16:00,201 - Epoch[2] Complete. Time taken: 00:00:00.011\n", |
| 156 | + "2023-01-20 14:16:00,201 - Engine run complete. Time taken: 00:00:00.192\n" |
| 157 | + ] |
| 158 | + }, |
152 | 159 | {
|
153 | 160 | "data": {
|
154 | 161 | "text/plain": [
|
|
157 | 164 | "\tepoch: 2\n",
|
158 | 165 | "\tepoch_length: 2\n",
|
159 | 166 | "\tmax_epochs: 2\n",
|
160 |
| - "\toutput: 34253.46875\n", |
| 167 | + "\toutput: 23339.560546875\n", |
161 | 168 | "\tbatch: <class 'tuple'>\n",
|
162 | 169 | "\tmetrics: <class 'dict'>\n",
|
163 | 170 | "\tdataloader: <class 'generator'>\n",
|
164 | 171 | "\tseed: <class 'NoneType'>\n",
|
165 | 172 | "\ttimes: <class 'dict'>"
|
166 | 173 | ]
|
167 | 174 | },
|
168 |
| - "execution_count": 3, |
| 175 | + "execution_count": null, |
169 | 176 | "metadata": {},
|
170 | 177 | "output_type": "execute_result"
|
171 | 178 | }
|
|
185 | 192 | },
|
186 | 193 | {
|
187 | 194 | "cell_type": "code",
|
188 |
| - "execution_count": 4, |
| 195 | + "execution_count": null, |
189 | 196 | "metadata": {
|
190 | 197 | "pycharm": {
|
191 | 198 | "name": "#%%\n"
|
192 | 199 | },
|
193 | 200 | "tags": []
|
194 | 201 | },
|
195 | 202 | "outputs": [
|
| 203 | + { |
| 204 | + "name": "stdout", |
| 205 | + "output_type": "stream", |
| 206 | + "text": [ |
| 207 | + "2023-01-20 14:16:00,208 - Engine run starting with max_epochs=2.\n", |
| 208 | + "2023-01-20 14:16:01,364 - Epoch[1] Complete. Time taken: 00:00:01.154\n", |
| 209 | + "2023-01-20 14:16:01,391 - Epoch[2] Complete. Time taken: 00:00:00.026\n", |
| 210 | + "2023-01-20 14:16:01,391 - Engine run complete. Time taken: 00:00:01.181\n" |
| 211 | + ] |
| 212 | + }, |
196 | 213 | {
|
197 | 214 | "data": {
|
198 | 215 | "text/plain": [
|
|
201 | 218 | "\tepoch: 2\n",
|
202 | 219 | "\tepoch_length: 2\n",
|
203 | 220 | "\tmax_epochs: 2\n",
|
204 |
| - "\toutput: 30694.720703125\n", |
| 221 | + "\toutput: 22608.560546875\n", |
205 | 222 | "\tbatch: <class 'tuple'>\n",
|
206 | 223 | "\tmetrics: <class 'dict'>\n",
|
207 | 224 | "\tdataloader: <class 'generator'>\n",
|
208 | 225 | "\tseed: <class 'NoneType'>\n",
|
209 | 226 | "\ttimes: <class 'dict'>"
|
210 | 227 | ]
|
211 | 228 | },
|
212 |
| - "execution_count": 4, |
| 229 | + "execution_count": null, |
213 | 230 | "metadata": {},
|
214 | 231 | "output_type": "execute_result"
|
215 | 232 | }
|
|
229 | 246 | },
|
230 | 247 | {
|
231 | 248 | "cell_type": "code",
|
232 |
| - "execution_count": 6, |
| 249 | + "execution_count": null, |
233 | 250 | "metadata": {
|
234 | 251 | "pycharm": {
|
235 | 252 | "name": "#%%\n"
|
236 | 253 | }
|
237 | 254 | },
|
238 | 255 | "outputs": [
|
| 256 | + { |
| 257 | + "name": "stdout", |
| 258 | + "output_type": "stream", |
| 259 | + "text": [ |
| 260 | + "2023-01-20 14:16:01,402 - Engine run starting with max_epochs=2.\n", |
| 261 | + "2023-01-20 14:16:01,475 - Epoch[1] Complete. Time taken: 00:00:00.073\n", |
| 262 | + "2023-01-20 14:16:01,575 - Epoch[2] Complete. Time taken: 00:00:00.100\n", |
| 263 | + "2023-01-20 14:16:01,576 - Engine run complete. Time taken: 00:00:00.174\n" |
| 264 | + ] |
| 265 | + }, |
239 | 266 | {
|
240 | 267 | "data": {
|
241 | 268 | "text/plain": [
|
|
244 | 271 | "\tepoch: 2\n",
|
245 | 272 | "\tepoch_length: 2\n",
|
246 | 273 | "\tmax_epochs: 2\n",
|
247 |
| - "\toutput: 26988.939453125\n", |
| 274 | + "\toutput: 21955.39453125\n", |
248 | 275 | "\tbatch: <class 'tuple'>\n",
|
249 | 276 | "\tmetrics: <class 'dict'>\n",
|
250 | 277 | "\tdataloader: <class 'generator'>\n",
|
251 | 278 | "\tseed: <class 'NoneType'>\n",
|
252 | 279 | "\ttimes: <class 'dict'>"
|
253 | 280 | ]
|
254 | 281 | },
|
255 |
| - "execution_count": 6, |
| 282 | + "execution_count": null, |
256 | 283 | "metadata": {},
|
257 | 284 | "output_type": "execute_result"
|
258 | 285 | }
|
|
281 | 308 | "name": "python",
|
282 | 309 | "nbconvert_exporter": "python",
|
283 | 310 | "pygments_lexer": "ipython3",
|
284 |
| - "version": "3.8.10" |
| 311 | + "version": "3.8.13" |
285 | 312 | }
|
286 | 313 | },
|
287 | 314 | "nbformat": 4,
|
|
0 commit comments