diff --git a/src/super_gradients/training/sg_trainer/sg_trainer.py b/src/super_gradients/training/sg_trainer/sg_trainer.py index 7ba08998ae..566228bc64 100755 --- a/src/super_gradients/training/sg_trainer/sg_trainer.py +++ b/src/super_gradients/training/sg_trainer/sg_trainer.py @@ -239,13 +239,15 @@ def train_from_config(cls, cfg: Union[DictConfig, dict]) -> Tuple[nn.Module, Tup :return: the model and the output of trainer.train(...) (i.e results tuple) """ - # TODO: bind checkpoint_run_id setup_device( device=core_utils.get_param(cfg, "device"), multi_gpu=core_utils.get_param(cfg, "multi_gpu"), num_gpus=core_utils.get_param(cfg, "num_gpus"), ) + # Create resolved config before instantiation + recipe_logged_cfg = {"recipe_config": OmegaConf.to_container(cfg, resolve=True)} + # INSTANTIATE ALL OBJECTS IN CFG cfg = hydra.utils.instantiate(cfg) @@ -283,7 +285,6 @@ def train_from_config(cls, cfg: Union[DictConfig, dict]) -> Tuple[nn.Module, Tup test_loaders = maybe_instantiate_test_loaders(cfg) - recipe_logged_cfg = {"recipe_config": OmegaConf.to_container(cfg, resolve=True)} # TRAIN res = trainer.train( model=model,