code: def run_example(FLAGS):
      """
      Run parallel Sherpa optimization over a set of discrete hp combinations.
      """
  
      parameters = [
          sherpa.Continuous("learning_rate", [1e-5, 5e-1], "log"),
          sherpa.Continuous("decay", [1e-8, 1e-2], "log"),
          sherpa.Continuous("momentum", [0.0, 0.99]),
          sherpa.Continuous("dropout", [0.0001, 0.7]),
          sherpa.Ordinal("batch_size", [32, 64, 128, 256]),
      ]
  
      algorithm = bayesian_optimization.GPyOpt(
          max_concurrent=FLAGS.concurrent,
          model_type="GP",
          acquisition_type="EI",
          max_num_trials=100,
      )
  
      # Run on local machine.
      scheduler = LocalScheduler()
  
      rval = sherpa.optimize(
          parameters=parameters,
          algorithm=algorithm,
          dashboard_port=FLAGS.port,
          lower_is_better=False,
          command="python fashion_mlp.py",
          scheduler=scheduler,
          verbose=0,
          max_concurrent=FLAGS.concurrent,
          output_dir="./output_gpyopt_{}".format(
              time.strftime("%Y-%m-%d--%H-%M-%S")
          ),
      )
  
file_path: sherpa/examples/parallel-examples/fashion_mnist_benchmark/runner_gpyopt.py
imports: import os
  import argparse
  import sherpa
  import datetime
  import time
  from sherpa.schedulers import LocalScheduler, SGEScheduler
  import sherpa.algorithms.bayesian_optimization
label_desc: Use image node_id 1 for calling a global function with example usage: run_example(FLAGS) without return types