|
57 | 57 | },
|
58 | 58 | {
|
59 | 59 | "cell_type": "code",
|
60 |
| - "execution_count": null, |
| 60 | + "execution_count": 2, |
61 | 61 | "id": "e3bf0346",
|
62 | 62 | "metadata": {},
|
63 |
| - "outputs": [], |
| 63 | + "outputs": [ |
| 64 | + { |
| 65 | + "name": "stdout", |
| 66 | + "output_type": "stream", |
| 67 | + "text": [ |
| 68 | + "MONAI version: 1.4.0rc10\n", |
| 69 | + "Numpy version: 1.24.4\n", |
| 70 | + "Pytorch version: 2.5.0a0+872d972e41.nv24.08.01\n", |
| 71 | + "MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n", |
| 72 | + "MONAI rev id: cac21f6936a2e8d6e4e57e4e958f8e32aae1585e\n", |
| 73 | + "MONAI __file__: /usr/local/lib/python3.10/dist-packages/monai/__init__.py\n", |
| 74 | + "\n", |
| 75 | + "Optional dependencies:\n", |
| 76 | + "Pytorch Ignite version: 0.4.11\n", |
| 77 | + "ITK version: 5.4.0\n", |
| 78 | + "Nibabel version: 5.2.1\n", |
| 79 | + "scikit-image version: 0.23.2\n", |
| 80 | + "scipy version: 1.13.1\n", |
| 81 | + "Pillow version: 10.4.0\n", |
| 82 | + "Tensorboard version: 2.17.0\n", |
| 83 | + "gdown version: 5.2.0\n", |
| 84 | + "TorchVision version: 0.20.0a0\n", |
| 85 | + "tqdm version: 4.66.4\n", |
| 86 | + "lmdb version: 1.5.1\n", |
| 87 | + "psutil version: 5.9.8\n", |
| 88 | + "pandas version: 2.2.2\n", |
| 89 | + "einops version: 0.7.0\n", |
| 90 | + "transformers version: 4.40.2\n", |
| 91 | + "mlflow version: 2.16.0\n", |
| 92 | + "pynrrd version: 1.0.0\n", |
| 93 | + "clearml version: 1.16.3\n", |
| 94 | + "\n", |
| 95 | + "For details about installing the optional dependencies, please visit:\n", |
| 96 | + " https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n", |
| 97 | + "\n" |
| 98 | + ] |
| 99 | + } |
| 100 | + ], |
64 | 101 | "source": [
|
65 | 102 | "from scripts.diff_model_setting import setup_logging\n",
|
66 | 103 | "import copy\n",
|
|
336 | 373 | " model_config_filepath,\n",
|
337 | 374 | " \"--model_def\",\n",
|
338 | 375 | " model_def_filepath,\n",
|
| 376 | + " \"--num_gpus\",\n", |
| 377 | + " str(num_gpus),\n", |
339 | 378 | "]\n",
|
340 | 379 | "\n",
|
341 | 380 | "run_torchrun(module, module_args, num_gpus=num_gpus)"
|
|
457 | 496 | "INFO:training:[config] num_train_timesteps -> 1000.\n",
|
458 | 497 | "INFO:training:num_files_train: 2\n",
|
459 | 498 | "INFO:training:Training from scratch.\n",
|
460 |
| - "INFO:training:Scaling factor set to 0.89132159948349.\n", |
461 |
| - "INFO:training:scale_factor -> 0.89132159948349.\n", |
| 499 | + "INFO:training:Scaling factor set to 0.8903454542160034.\n", |
| 500 | + "INFO:training:scale_factor -> 0.8903454542160034.\n", |
462 | 501 | "INFO:training:torch.set_float32_matmul_precision -> highest.\n",
|
463 | 502 | "INFO:training:Epoch 1, lr 0.0001.\n",
|
464 |
| - "INFO:training:[2024-09-24 03:46:57] epoch 1, iter 1/2, loss: 0.7984, lr: 0.000100000000.\n", |
465 |
| - "INFO:training:[2024-09-24 03:46:58] epoch 1, iter 2/2, loss: 0.7911, lr: 0.000056250000.\n", |
466 |
| - "INFO:training:epoch 1 average loss: 0.7947.\n", |
| 503 | + "INFO:training:[2024-09-30 06:30:33] epoch 1, iter 1/2, loss: 0.7974, lr: 0.000100000000.\n", |
| 504 | + "INFO:training:[2024-09-30 06:30:33] epoch 1, iter 2/2, loss: 0.7939, lr: 0.000056250000.\n", |
| 505 | + "INFO:training:epoch 1 average loss: 0.7957.\n", |
467 | 506 | "INFO:training:Epoch 2, lr 2.5e-05.\n",
|
468 |
| - "INFO:training:[2024-09-24 03:46:59] epoch 2, iter 1/2, loss: 0.7910, lr: 0.000025000000.\n", |
469 |
| - "INFO:training:[2024-09-24 03:46:59] epoch 2, iter 2/2, loss: 0.7897, lr: 0.000006250000.\n", |
470 |
| - "INFO:training:epoch 2 average loss: 0.7903.\n", |
| 507 | + "INFO:training:[2024-09-30 06:30:35] epoch 2, iter 1/2, loss: 0.7902, lr: 0.000025000000.\n", |
| 508 | + "INFO:training:[2024-09-30 06:30:35] epoch 2, iter 2/2, loss: 0.7889, lr: 0.000006250000.\n", |
| 509 | + "INFO:training:epoch 2 average loss: 0.7895.\n", |
471 | 510 | "\n"
|
472 | 511 | ]
|
473 | 512 | }
|
|
484 | 523 | " model_config_filepath,\n",
|
485 | 524 | " \"--model_def\",\n",
|
486 | 525 | " model_def_filepath,\n",
|
| 526 | + " \"--num_gpus\",\n", |
| 527 | + " str(num_gpus),\n", |
487 | 528 | "]\n",
|
488 | 529 | "\n",
|
489 | 530 | "run_torchrun(module, module_args, num_gpus=num_gpus)"
|
|
518 | 559 | "output_type": "stream",
|
519 | 560 | "text": [
|
520 | 561 | "\n",
|
521 |
| - "INFO:inference:Using cuda:0 of 1 with random seed: 62801\n", |
| 562 | + "INFO:inference:Using cuda:0 of 1 with random seed: 93612\n", |
522 | 563 | "INFO:inference:[config] ckpt_filepath -> ./temp_work_dir/./models/diff_unet_ckpt.pt.\n",
|
523 |
| - "INFO:inference:[config] random_seed -> 62801.\n", |
| 564 | + "INFO:inference:[config] random_seed -> 93612.\n", |
524 | 565 | "INFO:inference:[config] output_prefix -> unet_3d.\n",
|
525 | 566 | "INFO:inference:[config] output_size -> (256, 256, 128).\n",
|
526 | 567 | "INFO:inference:[config] out_spacing -> (1.0, 1.0, 0.75).\n",
|
527 | 568 | "INFO:root:`controllable_anatomy_size` is not provided.\n",
|
528 | 569 | "INFO:inference:checkpoints ./temp_work_dir/./models/diff_unet_ckpt.pt loaded.\n",
|
529 |
| - "INFO:inference:scale_factor -> 0.89132159948349.\n", |
| 570 | + "INFO:inference:scale_factor -> 0.8903454542160034.\n", |
530 | 571 | "INFO:inference:num_downsample_level -> 4, divisor -> 4.\n",
|
531 | 572 | "INFO:inference:noise: cuda:0, torch.float32, <class 'torch.Tensor'>\n",
|
532 | 573 | "\n",
|
533 | 574 | " 0%| | 0/10 [00:00<?, ?it/s]\n",
|
534 |
| - " 10%|███████▍ | 1/10 [00:00<00:02, 3.62it/s]\n", |
535 |
| - " 40%|█████████████████████████████▌ | 4/10 [00:00<00:00, 12.53it/s]\n", |
536 |
| - " 80%|███████████████████████████████████████████████████████████▏ | 8/10 [00:00<00:00, 19.54it/s]\n", |
537 |
| - "100%|█████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 18.16it/s]\n", |
538 |
| - "INFO:inference:Saved ./temp_work_dir/./predictions/unet_3d_seed62801_size256x256x128_spacing1.00x1.00x0.75_20240924034721.nii.gz.\n", |
| 575 | + " 10%|███████▍ | 1/10 [00:00<00:02, 3.48it/s]\n", |
| 576 | + " 40%|█████████████████████████████▌ | 4/10 [00:00<00:00, 12.23it/s]\n", |
| 577 | + " 80%|███████████████████████████████████████████████████████████▏ | 8/10 [00:00<00:00, 19.26it/s]\n", |
| 578 | + "100%|█████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 17.80it/s]\n", |
| 579 | + "INFO:inference:Saved ./temp_work_dir/./predictions/unet_3d_seed93612_size256x256x128_spacing1.00x1.00x0.75_20240930063144_rank0.nii.gz.\n", |
539 | 580 | "\n"
|
540 | 581 | ]
|
541 | 582 | }
|
|
552 | 593 | " model_config_filepath,\n",
|
553 | 594 | " \"--model_def\",\n",
|
554 | 595 | " model_def_filepath,\n",
|
| 596 | + " \"--num_gpus\",\n", |
| 597 | + " str(num_gpus),\n", |
555 | 598 | "]\n",
|
556 | 599 | "\n",
|
557 | 600 | "run_torchrun(module, module_args, num_gpus=num_gpus)\n",
|
|
562 | 605 | ],
|
563 | 606 | "metadata": {
|
564 | 607 | "kernelspec": {
|
565 |
| - "display_name": "Python 3 (ipykernel)", |
| 608 | + "display_name": "Python 3", |
566 | 609 | "language": "python",
|
567 | 610 | "name": "python3"
|
568 | 611 | },
|
|
0 commit comments