modify mgpu logging level
Browse files- README.md +6 -0
- configs/metadata.json +3 -2
- configs/multi_gpu_train.json +4 -1
- configs/train.json +1 -1
- docs/README.md +6 -0
README.md
CHANGED
|
@@ -124,6 +124,12 @@ For more details usage instructions, visit the [MONAI Bundle Configuration Page]
|
|
| 124 |
python -m monai.bundle run --config_file configs/train.json
|
| 125 |
```
|
| 126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
#### Override the `train` config to execute multi-GPU training
|
| 128 |
|
| 129 |
```
|
|
|
|
| 124 |
python -m monai.bundle run --config_file configs/train.json
|
| 125 |
```
|
| 126 |
|
| 127 |
+
Please note that if the default dataset path is not modified with the actual path in the bundle config files, you can also override it by using `--dataset_dir`:
|
| 128 |
+
|
| 129 |
+
```
|
| 130 |
+
python -m monai.bundle run --config_file configs/train.json --dataset_dir <actual dataset path>
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
#### Override the `train` config to execute multi-GPU training
|
| 134 |
|
| 135 |
```
|
configs/metadata.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
| 3 |
-
"version": "0.5.
|
| 4 |
"changelog": {
|
|
|
|
| 5 |
"0.5.4": "retrain using an internal pretrained ResNet18",
|
| 6 |
"0.5.3": "make the training bundle deterministic",
|
| 7 |
"0.5.2": "update TensorRT descriptions",
|
|
@@ -25,7 +26,7 @@
|
|
| 25 |
"0.1.1": "fix location variable name change",
|
| 26 |
"0.1.0": "initialize release of the bundle"
|
| 27 |
},
|
| 28 |
-
"monai_version": "1.2.
|
| 29 |
"pytorch_version": "1.13.1",
|
| 30 |
"numpy_version": "1.22.2",
|
| 31 |
"optional_packages_version": {
|
|
|
|
| 1 |
{
|
| 2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
| 3 |
+
"version": "0.5.5",
|
| 4 |
"changelog": {
|
| 5 |
+
"0.5.5": "modify mgpu logging level",
|
| 6 |
"0.5.4": "retrain using an internal pretrained ResNet18",
|
| 7 |
"0.5.3": "make the training bundle deterministic",
|
| 8 |
"0.5.2": "update TensorRT descriptions",
|
|
|
|
| 26 |
"0.1.1": "fix location variable name change",
|
| 27 |
"0.1.0": "initialize release of the bundle"
|
| 28 |
},
|
| 29 |
+
"monai_version": "1.2.0rc6",
|
| 30 |
"pytorch_version": "1.13.1",
|
| 31 |
"numpy_version": "1.22.2",
|
| 32 |
"optional_packages_version": {
|
configs/multi_gpu_train.json
CHANGED
|
@@ -28,7 +28,10 @@
|
|
| 28 |
"$import torch.distributed as dist",
|
| 29 |
"$dist.is_initialized() or dist.init_process_group(backend='nccl')",
|
| 30 |
"$torch.cuda.set_device(@device)",
|
| 31 |
-
"$monai.utils.set_determinism(seed=123)"
|
|
|
|
|
|
|
|
|
|
| 32 |
],
|
| 33 |
"run": [
|
| 34 |
"$@train#trainer.run()"
|
|
|
|
| 28 |
"$import torch.distributed as dist",
|
| 29 |
"$dist.is_initialized() or dist.init_process_group(backend='nccl')",
|
| 30 |
"$torch.cuda.set_device(@device)",
|
| 31 |
+
"$monai.utils.set_determinism(seed=123)",
|
| 32 |
+
"$import logging",
|
| 33 |
+
"$@train#trainer.logger.setLevel(logging.WARNING if dist.get_rank() > 0 else logging.INFO)",
|
| 34 |
+
"$@validate#evaluator.logger.setLevel(logging.WARNING if dist.get_rank() > 0 else logging.INFO)"
|
| 35 |
],
|
| 36 |
"run": [
|
| 37 |
"$@train#trainer.run()"
|
configs/train.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"model_name": "resnet18",
|
| 33 |
"num_classes": 1,
|
| 34 |
"use_conv": true,
|
| 35 |
-
"pretrained":
|
| 36 |
},
|
| 37 |
"network": "$@network_def.to(@device)",
|
| 38 |
"loss": {
|
|
|
|
| 32 |
"model_name": "resnet18",
|
| 33 |
"num_classes": 1,
|
| 34 |
"use_conv": true,
|
| 35 |
+
"pretrained": false
|
| 36 |
},
|
| 37 |
"network": "$@network_def.to(@device)",
|
| 38 |
"loss": {
|
docs/README.md
CHANGED
|
@@ -117,6 +117,12 @@ For more details usage instructions, visit the [MONAI Bundle Configuration Page]
|
|
| 117 |
python -m monai.bundle run --config_file configs/train.json
|
| 118 |
```
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
#### Override the `train` config to execute multi-GPU training
|
| 121 |
|
| 122 |
```
|
|
|
|
| 117 |
python -m monai.bundle run --config_file configs/train.json
|
| 118 |
```
|
| 119 |
|
| 120 |
+
Please note that if the default dataset path is not modified with the actual path in the bundle config files, you can also override it by using `--dataset_dir`:
|
| 121 |
+
|
| 122 |
+
```
|
| 123 |
+
python -m monai.bundle run --config_file configs/train.json --dataset_dir <actual dataset path>
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
#### Override the `train` config to execute multi-GPU training
|
| 127 |
|
| 128 |
```
|