예제 #1
0
    def on_init_end(self, trainer: "pl.Trainer") -> None:
        current_frame = inspect.currentframe()
        # Trainer.init() -> Trainer._call_callback_hooks() -> Callback.on_init_end()
        frame = current_frame.f_back.f_back
        init_args = {}
        for local_args in collect_init_args(frame, []):
            init_args.update(local_args)

        self.work.trainer_hparams = self._sanitize_trainer_init_args(init_args)
 def get_init_args_wrapper(self):
     frame = inspect.currentframe()
     self.result = collect_init_args(frame, [])