docstr: When using validation skipping on restart with a custom epoch loop, we warn the user that we skip
  support to not interfere with their custom logic.
docstr_tok: ["When","using","validation","skipping","on","restart","with","a","custom","epoch","loop",",","we","warn","the","user","that","we","skip","support","to","not","interfere","with","their","custom","logic","."]
code: def test_warning_validation_skipping_when_custom_epoch_loop(
      self, tmp_path
  ):
      """When using validation skipping on restart with a custom epoch loop, we warn the user that we skip
      support to not interfere with their custom logic.
      """
      tmp_path = tmp_path / "test_3"
  
      class CustomLoop(_TrainingEpochLoop):
          ...
  
      trainer = pl.Trainer(
          accelerator="cpu",
          enable_checkpointing=False,
          logger=False,
          max_epochs=1,
          val_check_interval=0.33,
      )
      ## _TrainingEpochLoop in PTL 2.0 takes trainer as an arg
      loop = CustomLoop(trainer)
      trainer.fit_loop.epoch_loop = loop
      with pytest.warns(
          UserWarning, match="Detected custom epoch loop"
      ):
          exp_manager(trainer, {"explicit_log_dir": str(tmp_path)})
  
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 14 for calling the TestExpManager obj's underlying member method code with example usage: obj.test_warning_validation_skipping_when_custom_epoch_loop(tmp_path) without return types