code: def predictor_hpo(searcher, scheduler, presets=None):
      dataset = PetFinderDataset()
  
      hyperparameters = {
          "optimization.learning_rate": tune.uniform(0.0001, 0.01),
          "optimization.max_epochs": 1,
          "model.names": [
              "numerical_mlp",
              "categorical_mlp",
              "fusion_mlp",
          ],
          "data.categorical.convert_to_text": False,
          "data.numerical.convert_to_text": False,
          "env.num_workers": 0,
          "env.num_workers_evaluation": 0,
      }
  
      hyperparameter_tune_kwargs = {
          "searcher": searcher,
          "scheduler": scheduler,
          "num_trials": 2,
      }
  
      predictor = MultiModalPredictor(
          label=dataset.label_columns[0],
          problem_type=dataset.problem_type,
          eval_metric=dataset.metric,
          presets=presets,
      )
  
      save_path = os.path.join(
          get_home_dir(), "hpo", f"_{searcher}", f"_{scheduler}"
      )
      if os.path.exists(save_path):
          shutil.rmtree(save_path)
  
      predictor_hpo = predictor.fit(
          train_data=dataset.train_df,
          hyperparameters=hyperparameters,
          save_path=save_path,
          hyperparameter_tune_kwargs=hyperparameter_tune_kwargs,
      )
      assert predictor == predictor_hpo
  
      score = predictor.evaluate(dataset.test_df)
      verify_predictor_save_load(predictor, dataset.test_df)
  
      # test for continuous training
      predictor = predictor.fit(
          train_data=dataset.train_df,
          hyperparameters=hyperparameters,
          hyperparameter_tune_kwargs=hyperparameter_tune_kwargs,
      )
  
file_path: autogluon/multimodal/tests/unittests/others_2/test_hpo.py
imports: import os
  import shutil
  import pytest
  from ray import tune
  from autogluon.core.hpo.ray_tune_constants import SCHEDULER_PRESETS, SEARCHER_PRESETS
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.constants import ALL_MODEL_QUALITIES
  from ..others.test_matcher import verify_matcher_save_load
  from ..predictor.test_predictor import verify_predictor_save_load
  from ..utils.unittest_datasets import IDChangeDetectionDataset, PetFinderDataset
  from ..utils.utils import get_home_dir
label_desc: Use image node_id 1 for calling a global function with example usage: predictor_hpo(searcher, scheduler, presets) without return types