src/transformers/integrations.py/WandbCallback/on_train_begin
class WandbCallback:    def on_train_begin(self, args, state, control, model=None, **kwargs):
        if self._wandb is None:
            return
        hp_search = state.is_hyper_param_search
        if hp_search:
            self._wandb.finish()
            self._initialized = False
        if not self._initialized:
            self.setup(args, state, model, **kwargs)