Skip to content

Training hyperparams

get(config_name, overriding_params=None)

Class for creating training hyper parameters dictionary, taking defaults from yaml files in src/super_gradients/recipes.

Parameters:

Name Type Description Default
config_name

yaml config filename in recipes (for example coco2017_yolox).

required
overriding_params Dict

Dict, dictionary like object containing entries to override in the recipe's training hyper parameters dictionary.

None
Source code in src/super_gradients/training/training_hyperparams/training_hyperparams.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def get(config_name, overriding_params: Dict = None) -> Dict:
    """
    Class for creating training hyper parameters dictionary, taking defaults from yaml
     files in src/super_gradients/recipes.

    :param config_name: yaml config filename in recipes (for example coco2017_yolox).
    :param overriding_params: Dict, dictionary like object containing entries to override in the recipe's training
     hyper parameters dictionary.
    """
    if overriding_params is None:
        overriding_params = dict()

    cfg = load_recipe(config_name=config_name)  # This loads the full recipe, not just training_hyperparams
    cfg = hydra.utils.instantiate(cfg)
    training_params = cfg.training_hyperparams

    training_params = override_default_params_without_nones(overriding_params, training_params)
    return training_params