code: def test_autorunner_hpo(self) -> None:
      work_dir = os.path.join(self.test_path, "work_dir")
      runner = AutoRunner(
          work_dir=work_dir,
          input=self.data_src_cfg,
          hpo=True,
          ensemble=False,
          templates_path_or_url=get_testing_algo_template_path(),
          allow_skip=False,
      )
      hpo_param = {
          "num_epochs_per_validation": train_param[
              "num_epochs_per_validation"
          ],
          "num_images_per_batch": train_param["num_images_per_batch"],
          "num_epochs": train_param["num_epochs"],
          "num_warmup_epochs": train_param["num_warmup_epochs"],
          "use_pretrain": train_param["use_pretrain"],
          "pretrained_path": train_param["pretrained_path"],
          # below are to shorten the time for dints
          "training#num_epochs_per_validation": train_param[
              "num_epochs_per_validation"
          ],
          "training#num_images_per_batch": train_param[
              "num_images_per_batch"
          ],
          "training#num_epochs": train_param["num_epochs"],
          "training#num_warmup_epochs": train_param[
              "num_warmup_epochs"
          ],
          "searching#num_epochs_per_validation": train_param[
              "num_epochs_per_validation"
          ],
          "searching#num_images_per_batch": train_param[
              "num_images_per_batch"
          ],
          "searching#num_epochs": train_param["num_epochs"],
          "searching#num_warmup_epochs": train_param[
              "num_warmup_epochs"
          ],
          "nni_dry_run": True,
      }
      search_space = {
          "learning_rate": {
              "_type": "choice",
              "_value": [0.0001, 0.001, 0.01, 0.1],
          }
      }
      runner.set_num_fold(1)
      runner.set_nni_search_space(search_space)
      runner.set_hpo_params(params=hpo_param)
      with skip_if_downloading_fails():
          runner.run()
  
file_path: MONAI/tests/test_integration_autorunner.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  import nibabel
  import numpy
  import torch
  from monai.apps.auto3dseg import AutoRunner
  from monai.bundle.config_parser import ConfigParser
  from monai.data import create_test_image_3d
  from monai.utils import optional_import
  from tests.utils import SkipIfBeforePyTorchVersion, get_testing_algo_template_path, skip_if_downloading_fails, skip_if_no_cuda, skip_if_quick
label_desc: Use image node_id 5 for calling the TestAutoRunner obj's underlying member method code with example usage: obj.test_autorunner_hpo() without return types