docstr: Test that trainer creating modelcheckpoint and asking exp_manager to do it too results in errors, but
  is error free if only one is asked to do so.
docstr_tok: ["Test","that","trainer","creating","modelcheckpoint","and","asking","exp_manager","to","do","it","too","results","in","errors",",","but","is","error","free","if","only","one","is","asked","to","do","so","."]
code: def test_checkpoint_configurations(self):
      """Test that trainer creating modelcheckpoint and asking exp_manager to do it too results in errors, but
      is error free if only one is asked to do so.
      """
      disable_tb_logger = {"create_tensorboard_logger": False}
      test_trainer = pl.Trainer(
          accelerator="cpu"
      )  # Should create logger and modelcheckpoint
      with pytest.raises(
          CheckpointMisconfigurationError
      ):  # Fails because both try to create modelcheckpoint
          exp_manager(test_trainer, disable_tb_logger)
  
      # Should succeed without error
      exp_manager(
          test_trainer,
          {
              "create_checkpoint_callback": False,
              "create_tensorboard_logger": False,
          },
      )
  
      test_trainer_2 = pl.Trainer(
          accelerator="cpu", enable_checkpointing=False
      )
      exp_manager(test_trainer_2, disable_tb_logger)
  
imports: import math
  import os
  import re
  from pathlib import Path
  from typing import Any
  import pytest
  import pytorch_lightning
  import torch
  from omegaconf import OmegaConf
  from omegaconf.errors import OmegaConfBaseException
  from pytorch_lightning import Callback
  from pytorch_lightning.loops import _TrainingEpochLoop
  from nemo.constants import NEMO_ENV_VARNAME_VERSION
  from nemo.core.classes import ModelPT
  from nemo.utils.exp_manager import CheckpointMisconfigurationError, LoggerMisconfigurationError, NotFoundError, exp_manager
label_desc: Use image node_id 3 for calling the TestExpManager obj's underlying member method code with example usage: obj.test_checkpoint_configurations() without return types