diff --git a/src/eval.py b/src/eval.py index 64790347a..9e15a3e16 100644 --- a/src/eval.py +++ b/src/eval.py @@ -68,7 +68,7 @@ def evaluate(cfg: DictConfig) -> Tuple[Dict[str, Any], Dict[str, Any]]: if "_target_" in cfg.strategy: log.info(f"Instantiating strategy <{cfg.strategy._target_}>") strategy: Strategy = hydra.utils.instantiate(cfg.strategy) - if "mixed_precision" in strategy.__dict__: + if "mixed_precision" in strategy.__dict__ and strategy.mixed_precision is not None: strategy.mixed_precision.param_dtype = ( resolve_omegaconf_variable(cfg.strategy.mixed_precision.param_dtype) if cfg.strategy.mixed_precision.param_dtype is not None