monai
medical
katielink commited on
Commit
6ce2032
1 Parent(s): 7cec656

enable deterministic eval and inference

Browse files
configs/evaluate.json CHANGED
@@ -67,7 +67,7 @@
67
  "initialize": [
68
  "$import sys",
69
  "$sys.path.append(@bundle_root)",
70
- "$setattr(torch.backends.cudnn, 'benchmark', True)",
71
  "$import scripts",
72
  "$monai.data.register_writer('json', scripts.ClassificationWriter)"
73
  ],
 
67
  "initialize": [
68
  "$import sys",
69
  "$sys.path.append(@bundle_root)",
70
+ "$monai.utils.set_determinism(seed=123)",
71
  "$import scripts",
72
  "$monai.data.register_writer('json', scripts.ClassificationWriter)"
73
  ],
configs/inference.json CHANGED
@@ -108,7 +108,7 @@
108
  "amp": true
109
  },
110
  "initialize": [
111
- "$setattr(torch.backends.cudnn, 'benchmark', True)",
112
  "$import scripts",
113
  "$monai.data.register_writer('json', scripts.ClassificationWriter)"
114
  ],
 
108
  "amp": true
109
  },
110
  "initialize": [
111
+ "$monai.utils.set_determinism(seed=123)",
112
  "$import scripts",
113
  "$monai.data.register_writer('json', scripts.ClassificationWriter)"
114
  ],
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.1.0",
4
  "changelog": {
 
5
  "0.1.0": "Update deterministic results",
6
  "0.0.9": "Update README Formatting",
7
  "0.0.8": "enable deterministic training",
 
1
  {
2
  "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
3
+ "version": "0.1.1",
4
  "changelog": {
5
+ "0.1.1": "enable deterministic eval and inference",
6
  "0.1.0": "Update deterministic results",
7
  "0.0.9": "Update README Formatting",
8
  "0.0.8": "enable deterministic training",
configs/multi_gpu_evaluate.json CHANGED
@@ -21,6 +21,7 @@
21
  "$import torch.distributed as dist",
22
  "$dist.is_initialized() or dist.init_process_group(backend='nccl')",
23
  "$torch.cuda.set_device(@device)",
 
24
  "$import logging",
25
  "$@validate#evaluator.logger.setLevel(logging.WARNING if dist.get_rank() > 0 else logging.INFO)",
26
  "$import scripts",
 
21
  "$import torch.distributed as dist",
22
  "$dist.is_initialized() or dist.init_process_group(backend='nccl')",
23
  "$torch.cuda.set_device(@device)",
24
+ "$monai.utils.set_determinism(seed=123)",
25
  "$import logging",
26
  "$@validate#evaluator.logger.setLevel(logging.WARNING if dist.get_rank() > 0 else logging.INFO)",
27
  "$import scripts",