core.common.hpo_utils#

Copyright (c) Meta, Inc. and its affiliates.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Functions#

tune_reporter(→ None)

Wrapper function for tune.report()

label_metric_dict(metric_dict, split)

Module Contents#

core.common.hpo_utils.tune_reporter(iters, train_metrics, val_metrics, test_metrics=None, metric_to_opt: str = 'val_loss', min_max: str = 'min') None#

Wrapper function for tune.report()

Parameters:
  • iters (dict) – dict with training iteration info (e.g. steps, epochs)

  • train_metrics (dict) – train metrics dict

  • val_metrics (dict) – val metrics dict

  • test_metrics (dict, optional) – test metrics dict, default is None

  • metric_to_opt (str, optional) – str for val metric to optimize, default is val_loss

  • min_max (str, optional) – either “min” or “max”, determines whether metric_to_opt is to be minimized or maximized, default is min

core.common.hpo_utils.label_metric_dict(metric_dict, split)#