code: def main():
      ray.init()
      scheduler = AsyncHyperBandScheduler(grace_period=5, max_t=100)
      stopping_criteria = {"training_iteration": 1000}
  
      # Note: job ids from `ray.get_runtime_context().get_job_id()` are sequential within a cluster,
      # we need to find a better ray-provided uid.
      tuner = tune.Tuner(
          objective,
          run_config=air.RunConfig(
              name=f"ray-det-asha-test-{uuid.uuid4()}",
              stop=stopping_criteria,
              verbose=1,
          ),
          tune_config=tune.TuneConfig(
              metric="loss",
              mode="min",
              scheduler=scheduler,
              num_samples=20,
          ),
          param_space={
              "hp": tune.uniform(0, 2),
          },
      )
      results = tuner.fit()
      print(
          "Best hyperparameters found were: ",
          results.get_best_result().config,
      )
  
file_path: determined/examples/features/unmanaged/ray/ray_hp_search.py
imports: import random
  import uuid
  import ray
  from ray import air, tune
  from ray.air import session
  from ray.tune.schedulers import AsyncHyperBandScheduler
  from determined.experimental import core_v2
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types