Set options for GPU-based parameter customization/optimization. Args: gpu_customization: the switch to determine automatically customize/optimize bundle script/config parameters for each bundleAlgo based on gpus. Custom parameters are obtained through du
(
self, gpu_customization: bool = False, gpu_customization_specs: dict[str, Any] | None = None
)
| 460 | return num_fold |
| 461 | |
| 462 | def set_gpu_customization( |
| 463 | self, gpu_customization: bool = False, gpu_customization_specs: dict[str, Any] | None = None |
| 464 | ) -> AutoRunner: |
| 465 | """ |
| 466 | Set options for GPU-based parameter customization/optimization. |
| 467 | |
| 468 | Args: |
| 469 | gpu_customization: the switch to determine automatically customize/optimize bundle script/config |
| 470 | parameters for each bundleAlgo based on gpus. Custom parameters are obtained through dummy |
| 471 | training to simulate the actual model training process and hyperparameter optimization (HPO) |
| 472 | experiments. |
| 473 | gpu_customization_specs (optional): the dictionary to enable users overwrite the HPO settings. user can |
| 474 | overwrite part of variables as follows or all of them. The structure is as follows. |
| 475 | |
| 476 | .. code-block:: python |
| 477 | |
| 478 | gpu_customization_specs = { |
| 479 | 'ALGO': { |
| 480 | 'num_trials': 6, |
| 481 | 'range_num_images_per_batch': [1, 20], |
| 482 | 'range_num_sw_batch_size': [1, 20] |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | ALGO: the name of algorithm. It could be one of algorithm names (e.g., 'dints') or 'universal' which |
| 487 | would apply changes to all algorithms. Possible options are |
| 488 | |
| 489 | - {``"universal"``, ``"dints"``, ``"segresnet"``, ``"segresnet2d"``, ``"swinunetr"``}. |
| 490 | |
| 491 | num_trials: the number of HPO trials/experiments to run. |
| 492 | range_num_images_per_batch: the range of number of images per mini-batch. |
| 493 | range_num_sw_batch_size: the range of batch size in sliding-window inferer. |
| 494 | """ |
| 495 | self.gpu_customization = gpu_customization |
| 496 | if gpu_customization_specs is not None: |
| 497 | self.gpu_customization_specs = gpu_customization_specs |
| 498 | |
| 499 | return self |
| 500 | |
| 501 | def set_num_fold(self, num_fold: int = 5) -> AutoRunner: |
| 502 | """ |
no outgoing calls