def set_cfg(self, cfg):
        """
        Noticing that set-function should return self
        """

        override_cfg = {}
        if HYDRA_INSTALLED:
            from hydra._internal.config_loader_impl import ConfigLoaderImpl
            from hydra.core.override_parser.overrides_parser import OverridesParser

            hydra_cfg = OmegaConf.create()
            ConfigLoaderImpl._apply_overrides_to_config(
                OverridesParser.create().parse_overrides(overrides=self.args.overrides), hydra_cfg
            )

            if "exp" in hydra_cfg:
                for k, v in hydra_cfg.exp.items():
                    if hasattr(cfg, k):
                        if v != getattr(cfg, k):
                            print(f"Override {k} from {getattr(cfg, k)} to {v}")
                            cfg.__setattr__(k, v)
                            override_cfg[k] = v
                    else:
                        # only allow override exist attribute in exp
                        raise ValueError(f"Attribute {k} is not found in {cfg}")

        self.cfg = cfg
        self._override_cfg = override_cfg
        return self

        Noticing that set-function should return self
        
orz/exps/base_exp.py